!7 cm ProxyTest > DynPrintLogAndEnabled { transient autoDispose StandaloneHttpProxy proxy; switchable int httpInPort = 8080; switchable int httpsInPort; switchable int httpOutPort = 8888; *() { enabled = false; } start { if (!enabled) ret; proxy = new StandaloneHttpProxy; proxy.forwardServerAndPort = req -> HostAndPort("localhost", httpOutPort); proxy.port = httpInPort; proxy.serveLocalhostOnly = true; proxy.rewriteHostHeader = false; proxy.start(); } }