experimental_probe_resist -> probe_resistance
This commit is contained in:
parent
f2019d57c4
commit
dbaf326869
5 changed files with 11 additions and 11 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
||||
|
|
|
|||
2
setup.go
2
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()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue