Skip to content

Commit 406b3ef

Browse files
author
zhangch
committed
optimize README.md
1 parent 25ecc9e commit 406b3ef

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

README.md

+33-7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ This is a Golang implementation of the Socks5 protocol library.
44
To see in this [SOCKS Protocol Version 5](https://www.rfc-editor.org/rfc/rfc1928.html).
55
This library is also compatible with Socks4 and Socks4a.
66

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+
722
# Features
823

924
- socks5:
@@ -19,15 +34,17 @@ This library is also compatible with Socks4 and Socks4a.
1934
- Easy to read source code.
2035
- Similar to the Golang standard library experience.
2136

22-
# Install
37+
# Installation
2338

24-
`go get "github.com/haochen233/socks5"`
39+
``` sh
40+
$ go get "github.com/haochen233/socks5"`
41+
```
2542

26-
# Example
43+
# Examples
2744

28-
## Server
45+
## Server example
2946

30-
### simple(no authentication):
47+
### simple (no authentication):
3148

3249
```go
3350
package main
@@ -140,7 +157,7 @@ func main() {
140157
}
141158
```
142159
143-
## Client
160+
## Client example
144161
145162
### CONNECT usage:
146163
@@ -287,4 +304,13 @@ func main() {
287304
log.Fatal(err)
288305
}
289306
}
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

Comments
 (0)