Skip to content

Commit 0996d7f

Browse files
committed
docs: update README
Signed-off-by: black-desk <me@black-desk.cn> #205
1 parent 26cb75d commit 0996d7f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,30 @@ systemctl restart cgtproxy.service
4343

4444
[configuration guide]: ./docs/configuration.md
4545

46+
## Tips
47+
48+
1. cgproxy has CLI utilities `cgproxy` and `cgnoproxy`
49+
to temporarily run program with(out) proxy.
50+
51+
If you use the [example configuration] of `cgtproxy`,
52+
you can write a bash alias as this:
53+
54+
```bash
55+
alias cgtproxy-direct="systemd-run --user --slice cgtproxy-direct.slice"
56+
```
57+
58+
Then use it like this:
59+
60+
```bash
61+
cgtproxy-direct /some/command/to/run/without/proxy
62+
```
63+
64+
Go check the comments in example configuration
65+
about the `cgtproxy-direct.slice`, `cgtproxy-drop.slice`
66+
and `cgtproxy-proxy.slice`.
67+
68+
[example configuration]: ./misc/config/example.yaml
69+
4670
## The way how `cgtproxy` works.
4771

4872
Netfliter can be configured to filter network traffic [by cgroup],

0 commit comments

Comments
 (0)