Skip to content

Commit

Permalink
brook link supports socks5
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Aug 31, 2020
1 parent d947c5b commit 0772328
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/brook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ func main() {
&cli.StringFlag{
Name: "server",
Aliases: []string{"s"},
Usage: "Support $ brook server and $ brook wsserver address, like: 1.2.3.4:1080, ws://1.2.3.4:1080, wss://google.com:443/ws. Do not omit the port under any circumstances",
Usage: "Support $ brook server, $ brook wsserver and socks5 server, like: 1.2.3.4:1080, ws://1.2.3.4:1080, wss://google.com:443/ws, socks5://1.2.3.4:1080",
},
&cli.StringFlag{
Name: "password",
Expand Down
14 changes: 10 additions & 4 deletions docs/brook-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,35 @@
brook://urlencode(SERVER PASSWORD)
```

SERVER can be:
> urlencode() is a virtual RFC3986 function that means encoding string which in the parentheses
SERVER format:

* brook server: `server_ip:port`
* brook wsserver: `ws://wsserver_ip:port`, `wss://wsserver_domain:port`

> urlencode() is a virtual RFC3986 function that means encoding string which in the parentheses
* socks5: `socks5://server_ip:port`

### Example

* brook server: `1.2.3.4:9999`
* password: `password`

Link/QR:
`brook://1.2.3.4%3A9999%20password`

```
brook://1.2.3.4%3A9999%20password
```

### $ brook link/qr

```
$ brook link -s server_address:port -p password
$ brook link -s ws://wsserver_address:port -p password
$ brook link -s wss://wsserver_domain:port -p password
$ brook link -s socks5://server_address:port -p password
$ brook qr -s server_address:port -p password
$ brook qr -s ws://wsserver_address:port -p password
$ brook qr -s wss://wsserver_domain:port -p password
$ brook qr -s socks5://server_address:port -p password
```

0 comments on commit 0772328

Please sign in to comment.