From f5264f3789bed22b2ef52a9f2b75c1309dde9f2b Mon Sep 17 00:00:00 2001 From: cfal Date: Sun, 26 Feb 2023 01:29:07 +0900 Subject: [PATCH] Add more examples --- examples/http_through_socks.yaml | 21 +++++++++++++++++++++ examples/https.yaml | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 examples/http_through_socks.yaml create mode 100644 examples/https.yaml diff --git a/examples/http_through_socks.yaml b/examples/http_through_socks.yaml new file mode 100644 index 00000000..db566969 --- /dev/null +++ b/examples/http_through_socks.yaml @@ -0,0 +1,21 @@ +# An HTTP server (no TLS) that forwards connections via a SOCKS5 server. +- address: 127.0.0.1:8080 + transport: tcp + protocol: + type: http + username: secretuser + password: secretpass + rules: + # Directly connect to 192.168.* + - mask: 192.168.0.0/16 + action: allow + client_proxy: direct + # Forward all other connection requests through a SOCKS server. + - mask: 0.0.0.0/0 + action: allow + client_proxy: + - address: 127.0.0.1:1234 + protocol: + type: socks + username: socksuser + password: sockspass diff --git a/examples/https.yaml b/examples/https.yaml new file mode 100644 index 00000000..ab7806be --- /dev/null +++ b/examples/https.yaml @@ -0,0 +1,21 @@ +# An HTTPS server with Basic Authentication. +- address: 127.0.0.1:443 + transport: tcp + protocol: + type: tls + default_target: + cert: cert.pem + key: key.pem + protocol: + type: http + username: secretuser + password: secretpass + rules: + - mask: 1.2.3.4/32 + action: allow + override_ip: 192.168.0.1 + client_proxy: direct + - mask: 0.0.0.0/0 + action: allow + # Direct connection, don't forward requests through another proxy. + client_proxy: direct