experimental_probe_resist -> probe_resistance

This commit is contained in:
Sergey Frolov 2017-08-18 10:17:01 -04:00 committed by Sergey Frolov
parent f2019d57c4
commit dbaf326869
5 changed files with 11 additions and 11 deletions

View file

@ -14,7 +14,7 @@ forwardproxy {
ports 80 443 ports 80 443
hide_ip hide_ip
serve_pac proxy.pac serve_pac proxy.pac
experimental_probe_resist secretlink-7qS4+3dqm.localhost probe_resistance secretlink-7qS4+3dqm.localhost
response_timeout 30 response_timeout 30
dial_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. 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 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) 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. EXPERIMENTAL, HERE BE DRAGONS.
Attempts to hide the fact that the site is a forwardproxy. 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, Proxy will no longer respond with _"407 Proxy Authentication Required"_ if credentials are incorrect or absent,

View file

@ -122,7 +122,7 @@ func TestMain(m *testing.M) {
caddyForwardProxyProbeResist = caddyTestServer{addr: "127.0.0.1:8888", root: "./test/forwardproxy", caddyForwardProxyProbeResist = caddyTestServer{addr: "127.0.0.1:8888", root: "./test/forwardproxy",
directives: []string{"tls self_signed"}, HTTPRedirectPort: "8880", directives: []string{"tls self_signed"}, HTTPRedirectPort: "8880",
proxyEnabled: true, proxyDirectives: []string{"basicauth test pass", proxyEnabled: true, proxyDirectives: []string{"basicauth test pass",
"experimental_probe_resist test.localhost", "probe_resistance test.localhost",
"serve_pac superhiddenfile.pac"}} "serve_pac superhiddenfile.pac"}}
caddyForwardProxyProbeResist.StartTestServer() caddyForwardProxyProbeResist.StartTestServer()

View file

@ -15,7 +15,7 @@ generate_caddyfile() {
echo " basicauth ${PROXY_USERNAME} ${PROXY_PASSWORD}" >> ${CADDYFILE} echo " basicauth ${PROXY_USERNAME} ${PROXY_PASSWORD}" >> ${CADDYFILE}
fi fi
if [[ "${PROBE_RESISTANT}" = true ]]; then if [[ "${PROBE_RESISTANT}" = true ]]; then
echo " experimental_probe_resist ${SECRET_LINK}" >> ${CADDYFILE} echo " probe_resistance ${SECRET_LINK}" >> ${CADDYFILE}
fi fi
echo " }" >> ${CADDYFILE} echo " }" >> ${CADDYFILE}

View file

@ -87,7 +87,7 @@ func setup(c *caddy.Controller) error {
return c.ArgErr() return c.ArgErr()
} }
fp.hideIP = true fp.hideIP = true
case "experimental_probe_resist": case "probe_resistance":
if len(args) > 1 { if len(args) > 1 {
return c.ArgErr() return c.ArgErr()
} }

View file

@ -84,12 +84,12 @@ func TestSetup(t *testing.T) {
testParsing([]string{"hide_ip 0"}, false) testParsing([]string{"hide_ip 0"}, false)
testParsing([]string{"hide_ip 0 1"}, false) testParsing([]string{"hide_ip 0 1"}, false)
testParsing([]string{"experimental_probe_resist"}, false) testParsing([]string{"probe_resistance"}, false)
testParsing([]string{"experimental_probe_resist local.host"}, false) testParsing([]string{"probe_resistance local.host"}, false)
testParsing([]string{"experimental_probe_resist local.host very.local.host"}, false) testParsing([]string{"probe_resistance local.host very.local.host"}, false)
testParsing([]string{"experimental_probe_resist", "basicauth john doe"}, true) testParsing([]string{"probe_resistance", "basicauth john doe"}, true)
testParsing([]string{"experimental_probe_resist local.host", "basicauth john doe"}, true) testParsing([]string{"probe_resistance local.host", "basicauth john doe"}, true)
testParsing([]string{"experimental_probe_resist local.host very.local.host", "basicauth john doe"}, false) testParsing([]string{"probe_resistance local.host very.local.host", "basicauth john doe"}, false)
testParsing([]string{"serve_pac"}, true) testParsing([]string{"serve_pac"}, true)
testParsing([]string{"serve_pac \"\""}, true) testParsing([]string{"serve_pac \"\""}, true)