Skip to content

Commit

Permalink
Support both Socks proxy formats in PAC.
Browse files Browse the repository at this point in the history
  • Loading branch information
macronut committed Jan 25, 2024
1 parent 95911c4 commit 2576269
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,13 @@ func StartService() {
fmt.Println("HTTP:", service.Address)
go ListenAndServe(service.Address, service.PrivateKey, ptcp.HTTPProxy)
default_proxy = "HTTP " + service.Address
case "socks5":
fallthrough
case "socks":
fmt.Println("Socks:", service.Address)
go ListenAndServe(service.Address, service.PrivateKey, ptcp.SocksProxy)
go ptcp.SocksUDPProxy(service.Address)
default_proxy = "SOCKS5 " + service.Address
default_proxy = strings.ToUpper(service.Protocol) + " " + service.Address
case "redirect":
fmt.Println("Redirect:", service.Address)
go ListenAndServe(service.Address, service.PrivateKey, ptcp.RedirectProxy)
Expand Down

0 comments on commit 2576269

Please sign in to comment.