control = "127.0.0.1:8837"
[proxy]
bind_addr = "0.0.0.0:8090"
username = "wmproxy"
password = "wmproxy"
[http]
aa = "b"
max_read_buf = 1024000
access_log = "access main trace"
error_log = "error trace"
[http.log_format]
main = "{d(%Y-%m-%d %H:%M:%S)} {client_ip} {l} {url} path:{path} query:{query} host:{host} status: {status} {up_status} referer: {referer} user_agent: {user_agent} cookie: {cookie}"
[http.log_names]
access = "logs/access.log trace"
error = "logs/error.log"
default = "logs/default.log"
[http.limit_req_zone]
limit = "{client_ip} limit=10m rate=1000r/s"
[[http.upstream]]
name = "server"
server = [
{ addr = "127.0.0.1:8080", fail_timeout = 30 },
]
[[http.upstream]]
name = "ws"
server = [
{ addr = "127.0.0.1:8081", fail_timeout = 30 },
]
[[http.server]]
bind_addr = "0.0.0.0:80"
bind_ssl = "0.0.0.0:443"
up_name = "auto1.tool.fit"
proxy_connect_timeout = "10s"
proxy_read_timeout = "10s"
proxy_write_timeout = "10s"
root = ""
headers = [
"proxy x-forward-for {client_ip}",
"+ last-modified 'from proxy'",
]
limit_req = "zone=limit brust=1"
[[http.server.location]]
rate_limit = "4m/s"
rule = "/root"
file_server = { browse = true }
proxy_pass = ""
try_paths = "{path}/ '/ro(\\w+)/(.*) {path} /ro$1/Cargo.toml' /root/README.md"
[[http.server.location]]
rule = "@ws"
is_ws = true
proxy_url = "http://ws"
headers = ["+ aaa bbb"]
[[http.server.location]]
rule = "/static"
static_response = "I'm Ok {client_ip}"
[stream]
[[stream.upstream]]
name = "server"
server = [
{ addr = "127.0.0.1:8080", fail_timeout = 30 },
]
[[stream.upstream]]
name = "ws"
server = [
{ addr = "127.0.0.1:8081", fail_timeout = 30 },
]
[[stream.upstream]]
name = "udp"
bind = "udp"
server = [{ addr = "127.0.0.1:8089" }]
[[stream.server]]
bind_addr = "0.0.0.0:83"
up_name = "server"
[[stream.server]]
bind_addr = "0.0.0.0:85"
proxy_url = "ws://127.0.0.1:8081/"
bind_mode = "tcp2ws"
[[stream.server]]
bind_addr = "0.0.0.0:84"
bind_mode = "udp"
up_name = "udp"
timeout = "500s"
[[stream.server]]
bind_addr = "0.0.0.0:86"
up_name = "ws1"
proxy_url = "tcp://127.0.0.1:8082"
bind_mode = "ws2tcp"