tobychui / zoraxy

A general purpose HTTP reverse proxy and forwarding tool. Now written in Go!
https://zoraxy.aroz.org
GNU Affero General Public License v3.0
3.05k stars 184 forks source link

v3.1.2 #368

Closed tobychui closed 2 weeks ago

tobychui commented 2 weeks ago
tobychui commented 2 weeks ago

@PassiveLemon If you got some free time recently, can you help check if the new Stream Proxy config works in docker? I have changed the Stream Proxy config store from database to file based, and from my testing, it should have fixed #320. Thanks!

PassiveLemon commented 2 weeks ago

Building Zoraxy in the container fails with:

40.02 go: downloading github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
68.25 # imuslab.com/zoraxy
68.25 ./reverseproxy.go:1193:2: declared and not used: headerRewriteDefination
68.25 ./reverseproxy.go:1201:50: undefined: headerRewriteDefinition

Maybe this typo is the cause?

//          ------v DefinAtion
headerRewriteDefination := rewrite.UserDefinedHeader{
        Key:       name,
        Value:     value,
        Direction: rewriteDirection,
        IsRemove:  isRemove,
    }

    //Create a new custom header object                         ------v DefinItion
    err = targetProxyEndpoint.AddUserDefinedHeader(&headerRewriteDefinition)
    if err != nil {
        utils.SendErrorResponse(w, "unable to add header rewrite rule: "+err.Error())
        return
    }
PassiveLemon commented 2 weeks ago

I wasn't able to recreate the issue so I can't say if it was fixed but stream proxies do work