@@ -4,6 +4,21 @@ This is a Golang implementation of the Socks5 protocol library.
4
4
To see in this [ SOCKS Protocol Version 5] ( https://www.rfc-editor.org/rfc/rfc1928.html ) .
5
5
This library is also compatible with Socks4 and Socks4a.
6
6
7
+ # Contents
8
+
9
+ - [ Features] ( #Features )
10
+ - [ Install] ( #Installation )
11
+ - [ Examples] ( #Examples )
12
+ - [ Server example] ( #Server-example )
13
+ - [ simple (no authentication)] ( #simple-no-authentication )
14
+ - [ username/password authentication in memory] ( #username/password-authentication-in-memory )
15
+ - [ custom transporter to transmit data between client and remote] ( #custom-transporter-to-transmit-data-between-client-and-remote )
16
+ - [ Client example] ( #Client )
17
+ - [ CONNECT usage] ( #CONNECT-usage )
18
+ - [ UDP_ASSOCIATE usage] ( #UDP_ASSOCIATE-usage )
19
+ - [ BIND usage] ( #BIND-usage )
20
+ - [ FAQ] ( #FAQ )
21
+
7
22
# Features
8
23
9
24
- socks5:
@@ -19,15 +34,17 @@ This library is also compatible with Socks4 and Socks4a.
19
34
- Easy to read source code.
20
35
- Similar to the Golang standard library experience.
21
36
22
- # Install
37
+ # Installation
23
38
24
- ` go get "github.com/haochen233/socks5" `
39
+ ``` sh
40
+ $ go get " github.com/haochen233/socks5" `
41
+ ` ` `
25
42
26
- # Example
43
+ # Examples
27
44
28
- ## Server
45
+ # # Server example
29
46
30
- ### simple(no authentication):
47
+ # ## simple (no authentication):
31
48
32
49
` ` ` go
33
50
package main
@@ -140,7 +157,7 @@ func main() {
140
157
}
141
158
```
142
159
143
- ## Client
160
+ ## Client example
144
161
145
162
### CONNECT usage:
146
163
@@ -287,4 +304,13 @@ func main() {
287
304
log.Fatal(err)
288
305
}
289
306
}
290
- ```
307
+ ```
308
+
309
+ # FAQ:
310
+ - Server default enable socks4. How to disable socks4 support?
311
+ when you initialize a socks5 server, you should spefic this flag to disable explicitly.
312
+ ```go
313
+ server := &socks5.Server{
314
+ DisableSocks4: true,
315
+ }
316
+ ```
0 commit comments