Skip to content

Commit

Permalink
Remove ReusePort
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouzierinverse committed Dec 17, 2024
1 parent b81ff02 commit 4e44e90
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions go/chisel/share/settings/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ type Remote struct {
LastTouched time.Time
LocalHost, LocalPort, LocalProto string
RemoteHost, RemotePort, RemoteProto string
Dynamic, Socks, Reverse, Stdio bool
Handler string
ReusedTcpListener *net.TCPListener
ReusedUdpConn *net.UDPConn
ReusePort bool
Dynamic, Socks, Reverse, Stdio bool
}

const revPrefix = "R:"
Expand Down Expand Up @@ -172,7 +171,7 @@ func (r *Remote) setupLocalPort() error {
tl := l.(*net.TCPListener)
r.LocalPort = strconv.Itoa(tl.Addr().(*net.TCPAddr).Port)
r.ReusedTcpListener = tl
r.ReusePort = true
r.Dynamic = true
return nil
}

Expand All @@ -185,7 +184,7 @@ func (r *Remote) setupLocalPort() error {
uc := l.(*net.UDPConn)
r.LocalPort = strconv.Itoa(uc.LocalAddr().(*net.UDPAddr).Port)
r.ReusedUdpConn = uc
r.ReusePort = true
r.Dynamic = true
return nil
}
return errors.New("Proto not supported")
Expand Down

0 comments on commit 4e44e90

Please sign in to comment.