Skip to content

Commit

Permalink
Update GoCallBack.go
Browse files Browse the repository at this point in the history
  • Loading branch information
qtgolang committed Nov 25, 2023
1 parent 571fb62 commit c4ac646
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions SunnyNet/GoCallBack.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ type TcpConn struct {

// SetAgent Set仅支持S5代理 例如 socket5://admin:123456@127.0.0.1:8888
func (k *TcpConn) SetAgent(ProxyUrl string) bool {
k.c.TcpIp = public.NULL
k.c.TcpUser = public.NULL
k.c.TcpPass = public.NULL
if k.Type != public.SunnyNetMsgTypeTCPAboutToConnect {
return false
}
if k.c == nil {
return false
}
k.c.TcpIp = public.NULL
k.c.TcpUser = public.NULL
k.c.TcpPass = public.NULL
proxy, err := url.Parse(ProxyUrl)
if err != nil || proxy == nil {
return false
Expand Down

0 comments on commit c4ac646

Please sign in to comment.