mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
Update On Fri Oct 25 20:37:23 CEST 2024
This commit is contained in:
@@ -521,7 +521,6 @@ var clientRunFunc = func(s []string) error {
|
||||
return fmt.Errorf(stderror.ParseIPFailed)
|
||||
}
|
||||
}
|
||||
ipVersion := common.GetIPVersion(proxyIP.String())
|
||||
portBindings, err := appctl.FlatPortBindings(serverInfo.GetPortBindings())
|
||||
if err != nil {
|
||||
return fmt.Errorf(stderror.InvalidPortBindingsErr, err)
|
||||
@@ -530,10 +529,10 @@ var clientRunFunc = func(s []string) error {
|
||||
proxyPort := bindingInfo.GetPort()
|
||||
switch bindingInfo.GetProtocol() {
|
||||
case appctlpb.TransportProtocol_TCP:
|
||||
endpoint := protocol.NewUnderlayProperties(mtu, ipVersion, common.TCPTransport, nil, &net.TCPAddr{IP: proxyIP, Port: int(proxyPort)})
|
||||
endpoint := protocol.NewUnderlayProperties(mtu, common.TCPTransport, nil, &net.TCPAddr{IP: proxyIP, Port: int(proxyPort)})
|
||||
endpoints = append(endpoints, endpoint)
|
||||
case appctlpb.TransportProtocol_UDP:
|
||||
endpoint := protocol.NewUnderlayProperties(mtu, ipVersion, common.UDPTransport, nil, &net.UDPAddr{IP: proxyIP, Port: int(proxyPort)})
|
||||
endpoint := protocol.NewUnderlayProperties(mtu, common.UDPTransport, nil, &net.UDPAddr{IP: proxyIP, Port: int(proxyPort)})
|
||||
endpoints = append(endpoints, endpoint)
|
||||
default:
|
||||
return fmt.Errorf(stderror.InvalidTransportProtocol)
|
||||
|
||||
Reference in New Issue
Block a user