First testing version of what will become 2.0
Partial new config functionality.
This commit is contained in:
58
new_conf.conf
Normal file
58
new_conf.conf
Normal file
@@ -0,0 +1,58 @@
|
||||
# NOTE:
|
||||
# New functions:
|
||||
# match(String,Boolean):
|
||||
# String: The string to match.
|
||||
# Boolean: Case sensitivity.
|
||||
# General info:
|
||||
# The match command is used for UA-based blocking. Will block
|
||||
# anything that matches the String.
|
||||
|
||||
# NOTE:
|
||||
# Custom (sorta) datatypes.
|
||||
# String:
|
||||
# NSCL 2.0 equivalent of Pythons `str`.
|
||||
# Integer:
|
||||
# NSCL 2.0 equivalent of Pythons `int`.
|
||||
# Boolean:
|
||||
# NSCL 2.0 implementation of a Boolean. Supported inputs:
|
||||
# 0: False
|
||||
# 1: True
|
||||
|
||||
# NOTE:
|
||||
# This is a beta of NSCL 2.0
|
||||
# Current version: NSCL 2.0-raw-alpha0
|
||||
# The NSCL 1.3 spec and sample parser is uploaded to:
|
||||
# https://git.novacow.ch/Nova/nscl-1.3-spec/
|
||||
# The 2.0 spec will be uploaded to:
|
||||
# https://git.novacow.ch/Nova/nscl-2.0-spec/
|
||||
|
||||
# WARNING: This is an alpha spec of NSCL 2.0!!
|
||||
|
||||
host example.com {
|
||||
directory:/home/nova/Downloads/test/html
|
||||
allowed-methods:GET
|
||||
block-ip:match-ip("192.168",2)
|
||||
block-ua:match("Discordbot",0),match("Google",0)
|
||||
}
|
||||
|
||||
host cdn.example.com {
|
||||
directory:/home/nova/Downloads/test/cdn
|
||||
allowed-methods:GET,PUT
|
||||
block-ip:10.1.100.2
|
||||
block-ua:match("Discordbot",0)
|
||||
}
|
||||
|
||||
host modem.example.com {
|
||||
proxy:192.168.2.254
|
||||
key-file:/home/nova/Downloads/test/proxykey.pem
|
||||
cert-file:/home/nova/Downloads/test/proxycert.pem
|
||||
}
|
||||
|
||||
globals {
|
||||
http:1
|
||||
https:1
|
||||
port:8080
|
||||
https-port:8443
|
||||
global-key:/home/nova/Downloads/test/key.pem
|
||||
global-cert:/home/nova/Downloads/test/cert.pem
|
||||
}
|
||||
Reference in New Issue
Block a user