You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
482 B
24 lines
482 B
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
socks5 "github.com/armon/go-socks5"
|
|
)
|
|
|
|
func main() {
|
|
config := socks5.Config{
|
|
AuthMethods: []socks5.Authenticator{socks5.UserPassAuthenticator{Credentials: socks5.StaticCredentials{"user": "pass"}}},
|
|
Logger: log.New(os.Stderr, "", log.LstdFlags|log.LUTC|log.Lshortfile),
|
|
}
|
|
|
|
server, err := socks5.New(&config)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
if err = server.ListenAndServe("tcp", "127.0.0.1:8080"); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|