Skip to content

Commit

Permalink
Proxy port int conv trim fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yariya authored Nov 15, 2022
1 parent c761038 commit 14382c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (p *Proxy) CheckProxyHTTP(proxy string) {
var proxyPort = *port
s := strings.Split(proxy, ":")
if len(s) > 1 {
proxyPort, err = strconv.Atoi(s[1])
proxyPort, err = strconv.Atoi(strings.TrimSpace(s[1]))
if err != nil {
log.Println(err)
return
Expand Down Expand Up @@ -149,7 +149,7 @@ func (p *Proxy) CheckProxySocks4(proxy string) {
var proxyPort = *port
s := strings.Split(proxy, ":")
if len(s) > 1 {
proxyPort, err = strconv.Atoi(s[1])
proxyPort, err = strconv.Atoi(strings.TrimSpace(s[1]))
if err != nil {
log.Println(err)
return
Expand Down Expand Up @@ -204,7 +204,7 @@ func (p *Proxy) CheckProxySocks5(proxy string) {
var proxyPort = *port
s := strings.Split(proxy, ":")
if len(s) > 1 {
proxyPort, err = strconv.Atoi(s[1])
proxyPort, err = strconv.Atoi(strings.TrimSpace(s[1]))
if err != nil {
log.Println(err)
return
Expand Down

0 comments on commit 14382c6

Please sign in to comment.