Skip to content

Commit

Permalink
README: Add an example of connection limit.
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed Jun 5, 2024
1 parent 999611c commit c09d807
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,29 @@ Send signal `SIGUSR1` to socks5 server process after the authentication file is
killall -SIGUSR1 hev-socks5-server
```

### Limit number of connections

For example, limit the number of connections for `jerry` up to `2`:

#### Config

```yaml
auth:
file: conf/auth.txt
```
#### Auth file
```
jerry pass 1a
```

#### IPtables

```bash
iptables -A OUTPUT -p tcp --syn -m mark --mark 0x1a -m connlimit --connlimit-above 2 -j REJECT
```

## Contributors

* **Ammar Faizi** - https://github.com/ammarfaizi2
Expand Down

0 comments on commit c09d807

Please sign in to comment.