-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsocks5.go
More file actions
31 lines (24 loc) · 799 Bytes
/
socks5.go
File metadata and controls
31 lines (24 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package socks5
import (
"net"
)
const Socks5Version = 5
type AuthMethod byte
const (
AuthMethodNone AuthMethod = 0 // no authentication required (RFC 1928, section 3)
AuthUserPass AuthMethod = 2 // user/password authentication (RFC 1928, section 3)
AuthNoAcceptable AuthMethod = 255 // no acceptable authentication methods (RFC 1928, section 3)
AuthSuccess = 0 // client auth accepted
AuthFailure = 1 // client auth denied
AuthUserPassVersion = 1 // auth version byte (RFC 1929).
)
type CommandType byte
const (
CommandConnect CommandType = 1
CommandBind CommandType = 2
CommandAssociate CommandType = 3
)
var (
DefaultDialer ContextDialer = &net.Dialer{}
LogPrefix = "socks5: "
)