You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,10 +143,11 @@ You can specify 'match modifiers' for a function. The config line will only be u
143
143
```
144
144
path perform match against first arg of the function. This is usually a file path, but for 'connect' and 'bind' it can be a URL
145
145
basename peform a match against the basename (leading directory removed) of the first arg of the function
146
-
family for 'connect', 'bind' and 'accept' this is the url type. It can be 'tcp6', 'tcp', 'udp', or 'unix'
147
-
peer for 'connect' and 'accept' this is the remote host ip
148
-
user match against username
149
-
group match against groupname
146
+
family for 'connect', 'bind' and 'accept' this is the url type. It can be 'ip4', 'ip6', 'net', or 'unix'. 'net' matches both 'ip4' and 'ip6'
147
+
peer for 'connect' and 'accept' this is the remote host ip, extracted from 'path' which will be url
148
+
port for 'connect' and 'bind' this will be the port to bind or connect to
149
+
user match against username current process is running as
150
+
group match against primary groupname current process is running as
150
151
arg match if any arg in the programs arguments matches
151
152
```
152
153
@@ -281,9 +282,18 @@ Will map the hostname lookup to a false ipaddress in the form '0.0.0.x' When the
281
282
282
283
```
283
284
gethostip ipmap
284
-
connect family=tcp redirect socks:127.0.0.1:9090
285
+
connect path=tcp:* redirect socks:127.0.0.1:9090
285
286
```
286
287
288
+
It's a good idea to at least specify `path=tcp:` to prevent trying to redirect, say, a connection for syslog logging to socks. You can be more specific if you only want to map certain hosts. e.g. if local hosts are in the domain '.local' then we might use:
The use of `path=tcp:0.*` in this case ensures that only IP addresses that have been mapped with ipmap are redirected to socks. The use of `path!=*.local` in the 'gethostip' rule means that local addresses are not ipmapped.
0 commit comments