mirror of
https://github.com/fatedier/frp.git
synced 2025-07-18 11:50:45 +07:00
new feature: assign a random port if remote_port is 0 in type tcp and
udp
This commit is contained in:
@ -33,7 +33,7 @@ type TcpListener struct {
|
||||
log.Logger
|
||||
}
|
||||
|
||||
func ListenTcp(bindAddr string, bindPort int64) (l *TcpListener, err error) {
|
||||
func ListenTcp(bindAddr string, bindPort int) (l *TcpListener, err error) {
|
||||
tcpAddr, err := net.ResolveTCPAddr("tcp", fmt.Sprintf("%s:%d", bindAddr, bindPort))
|
||||
if err != nil {
|
||||
return l, err
|
||||
|
Reference in New Issue
Block a user