Skip to content

Commit

Permalink
optimize README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangch committed Nov 12, 2021
1 parent 25ecc9e commit 406b3ef
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ This is a Golang implementation of the Socks5 protocol library.
To see in this [SOCKS Protocol Version 5](https://www.rfc-editor.org/rfc/rfc1928.html).
This library is also compatible with Socks4 and Socks4a.

# Contents

- [Features](#Features)
- [Install](#Installation)
- [Examples](#Examples)
- [Server example](#Server-example)
- [simple (no authentication)](#simple-no-authentication)
- [username/password authentication in memory](#username/password-authentication-in-memory)
- [custom transporter to transmit data between client and remote](#custom-transporter-to-transmit-data-between-client-and-remote)
- [Client example](#Client)
- [CONNECT usage](#CONNECT-usage)
- [UDP_ASSOCIATE usage](#UDP_ASSOCIATE-usage)
- [BIND usage](#BIND-usage)
- [FAQ](#FAQ)

# Features

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

# Install
# Installation

`go get "github.com/haochen233/socks5"`
``` sh
$ go get "github.com/haochen233/socks5"`
```

# Example
# Examples

## Server
## Server example

### simple(no authentication):
### simple (no authentication):

```go
package main
Expand Down Expand Up @@ -140,7 +157,7 @@ func main() {
}
```
## Client
## Client example
### CONNECT usage:
Expand Down Expand Up @@ -287,4 +304,13 @@ func main() {
log.Fatal(err)
}
}
```
```
# FAQ:
- Server default enable socks4. How to disable socks4 support?
when you initialize a socks5 server, you should spefic this flag to disable explicitly.
```go
server := &socks5.Server{
DisableSocks4: true,
}
```

0 comments on commit 406b3ef

Please sign in to comment.