diff --git a/README.md b/README.md index acb88d8..ca2b987 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ forwardproxy { ports 80 443 hide_ip serve_pac proxy.pac - experimental_probe_resist secretlink-7qS4+3dqm.localhost + probe_resistance secretlink-7qS4+3dqm.localhost response_timeout 30 dial_timeout 30 } @@ -33,7 +33,7 @@ Default: no hiding, "_Forwarded: for="useraddress"_" will be sent out. Generate in memory and serve [Proxy Auto-Config](https://en.wikipedia.org/wiki/Proxy_auto-config) file on given path. If no path is provided, PAC file will be served at /proxy.pac Default: no PAC file generated by Caddy (you still can manually create and serve proxy.pac like a regular file) -* experimental_probe_resist secretlink.tld(optional) +* probe_resistance secretlink.tld(optional) EXPERIMENTAL, HERE BE DRAGONS. Attempts to hide the fact that the site is a forwardproxy. Proxy will no longer respond with _"407 Proxy Authentication Required"_ if credentials are incorrect or absent, diff --git a/common_test.go b/common_test.go index 2c78f75..116ff94 100644 --- a/common_test.go +++ b/common_test.go @@ -122,7 +122,7 @@ func TestMain(m *testing.M) { caddyForwardProxyProbeResist = caddyTestServer{addr: "127.0.0.1:8888", root: "./test/forwardproxy", directives: []string{"tls self_signed"}, HTTPRedirectPort: "8880", proxyEnabled: true, proxyDirectives: []string{"basicauth test pass", - "experimental_probe_resist test.localhost", + "probe_resistance test.localhost", "serve_pac superhiddenfile.pac"}} caddyForwardProxyProbeResist.StartTestServer() diff --git a/docker-build/gen_caddyfile_and_start.sh b/docker-build/gen_caddyfile_and_start.sh index 885a707..9608cba 100755 --- a/docker-build/gen_caddyfile_and_start.sh +++ b/docker-build/gen_caddyfile_and_start.sh @@ -15,7 +15,7 @@ generate_caddyfile() { echo " basicauth ${PROXY_USERNAME} ${PROXY_PASSWORD}" >> ${CADDYFILE} fi if [[ "${PROBE_RESISTANT}" = true ]]; then - echo " experimental_probe_resist ${SECRET_LINK}" >> ${CADDYFILE} + echo " probe_resistance ${SECRET_LINK}" >> ${CADDYFILE} fi echo " }" >> ${CADDYFILE} diff --git a/setup.go b/setup.go index 058322e..f22de24 100644 --- a/setup.go +++ b/setup.go @@ -87,7 +87,7 @@ func setup(c *caddy.Controller) error { return c.ArgErr() } fp.hideIP = true - case "experimental_probe_resist": + case "probe_resistance": if len(args) > 1 { return c.ArgErr() } diff --git a/setup_test.go b/setup_test.go index 75df089..76b2df0 100644 --- a/setup_test.go +++ b/setup_test.go @@ -84,12 +84,12 @@ func TestSetup(t *testing.T) { testParsing([]string{"hide_ip 0"}, false) testParsing([]string{"hide_ip 0 1"}, false) - testParsing([]string{"experimental_probe_resist"}, false) - testParsing([]string{"experimental_probe_resist local.host"}, false) - testParsing([]string{"experimental_probe_resist local.host very.local.host"}, false) - testParsing([]string{"experimental_probe_resist", "basicauth john doe"}, true) - testParsing([]string{"experimental_probe_resist local.host", "basicauth john doe"}, true) - testParsing([]string{"experimental_probe_resist local.host very.local.host", "basicauth john doe"}, false) + testParsing([]string{"probe_resistance"}, false) + testParsing([]string{"probe_resistance local.host"}, false) + testParsing([]string{"probe_resistance local.host very.local.host"}, false) + testParsing([]string{"probe_resistance", "basicauth john doe"}, true) + testParsing([]string{"probe_resistance local.host", "basicauth john doe"}, true) + testParsing([]string{"probe_resistance local.host very.local.host", "basicauth john doe"}, false) testParsing([]string{"serve_pac"}, true) testParsing([]string{"serve_pac \"\""}, true)