summaryrefslogtreecommitdiffhomepage
path: root/tunnel/tools/libwg-go/http-proxy.go
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-02-24 23:55:03 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2023-04-13 22:56:51 +0200
commit8ec3950a1c8f1135351c172c36a250818b25f4e6 (patch)
tree40b1ea2b6d58faf15d3dbe7bc7e592cb82344ac9 /tunnel/tools/libwg-go/http-proxy.go
parent9d679e0accf155187814e5ee164031278dd4b79d (diff)
tunnel: download pac in java
Diffstat (limited to 'tunnel/tools/libwg-go/http-proxy.go')
-rw-r--r--tunnel/tools/libwg-go/http-proxy.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/tunnel/tools/libwg-go/http-proxy.go b/tunnel/tools/libwg-go/http-proxy.go
index a44aaac6..9c457286 100644
--- a/tunnel/tools/libwg-go/http-proxy.go
+++ b/tunnel/tools/libwg-go/http-proxy.go
@@ -454,6 +454,20 @@ func (p *HttpProxy) SetPacFileUrl(pacFileUrl *url.URL) error {
return nil
}
+func (p *HttpProxy) SetPacFileContent(pacFile string) error {
+ ctx := newPacBodyCtx(pacFile, p.logger)
+
+ for _, handler := range(p.handlers) {
+ handler.setPacCtx(ctx)
+ }
+
+ if p.ctx != nil {
+ p.ctx.Destroy()
+ }
+ p.ctx = ctx
+ return nil
+}
+
func (p *HttpProxy) Start() (listen_port uint16, err error) {
p.logger.Verbosef("HttpProxy.Start()")
listen_port = 0