Skip to content

Commit

Permalink
Fixes for new fronted code
Browse files Browse the repository at this point in the history
  • Loading branch information
myleshorton committed Dec 9, 2024
1 parent b8c4f53 commit f793776
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ require (
github.com/getlantern/uuid v1.2.0
github.com/getlantern/waitforserver v1.0.1
github.com/getlantern/yaml v0.0.0-20190801163808-0c9bb1ebf426
github.com/golang/protobuf v1.5.3
github.com/hashicorp/golang-lru v0.5.4
github.com/jaffee/commandeer v0.6.0
github.com/keighl/mandrill v0.0.0-20170605120353-1775dd4b3b41
Expand Down Expand Up @@ -107,7 +108,6 @@ require (
github.com/getlantern/withtimeout v0.0.0-20160829163843-511f017cd913 // indirect
github.com/getsentry/sentry-go v0.20.0 // indirect
github.com/go-llsqlite/crawshaw v0.5.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/tetratelabs/wazero v1.7.1 // indirect
github.com/vishvananda/netns v0.0.1 // indirect
github.com/wlynxg/anet v0.0.3 // indirect
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ github.com/getlantern/multipath v0.0.0-20230510135141-717ed305ef50/go.mod h1:uzx
github.com/getlantern/nettest v1.0.0 h1:xg8vq9JrGzrFGFkFGwZwIJ5+kwtvyqNDIADwrANvhQg=
github.com/getlantern/nettest v1.0.0/go.mod h1:8wY0QwrdpkayCBQXjhZoJuwu2IHfp4UErrxgwaJ2UM4=
github.com/getlantern/netx v0.0.0-20190110220209-9912de6f94fd/go.mod h1:wKdY0ikOgzrWSeB9UyBVKPRhjXQ+vTb+BPeJuypUuNE=
github.com/getlantern/netx v0.0.0-20211206143627-7ccfeb739cbd/go.mod h1:WEXF4pfIfnHBUAKwLa4DW7kcEINtG6wjUkbL2btwXZQ=
github.com/getlantern/netx v0.0.0-20240814210628-0984f52e2d18 h1:I5xFq/HkvWGUPysqC8LQH9oks1WaM9BpcB+fjmvMRic=
github.com/getlantern/netx v0.0.0-20240814210628-0984f52e2d18/go.mod h1:4WkWbHy7Mqri9lxpLFN6dOU5nUy3kyNCpHxSRQZocv0=
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA=
Expand Down
2 changes: 2 additions & 0 deletions proxied/proxied.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ var (
fronterMu sync.RWMutex
)

// SetFronted sets the fronted.Fronted to use for domain fronting. This is a bit hacky but otherwise would
// require a significant refactor of the proxied package.
func SetFronted(f fronted.Fronted) {
fronterMu.Lock()
fronter = f
Expand Down
2 changes: 1 addition & 1 deletion services/bypass.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (b *bypassService) newProxy(name string, pc *commonconfig.ProxyConfig, conf
ProxyConfig: pc,
name: name,
proxyRoundTripper: newProxyRoundTripper(name, pc, userConfig, dialer),
dfRoundTripper: proxied.Fronted("bypass_fronted_roundtrip", 0),
dfRoundTripper: proxied.Fronted("bypass_fronted_roundtrip"),
sender: &sender{},
toggle: atomic.NewBool(mrand.Float32() < 0.5),
userConfig: userConfig,
Expand Down

0 comments on commit f793776

Please sign in to comment.