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-08-19 00:30:43 +0200
commitd87fefd1caa8dd8ffc4db607ce846a7bfa3c071e (patch)
tree2c9002939ef3c29e98c8f8a26b5c20c50ff7a950 /tunnel/tools/libwg-go/http-proxy.go
parente22cc0235da95caee124a4a9bf5b7ec26b2012e3 (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 c73e1edf..9c5a1036 100644
--- a/tunnel/tools/libwg-go/http-proxy.go
+++ b/tunnel/tools/libwg-go/http-proxy.go
@@ -445,6 +445,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