only masquerade ipv6 private address

This commit is contained in:
fancy
2020-05-08 11:15:23 +08:00
parent d3b2dc0465
commit 6c24c68831
3 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10)
project(cgproxy VERSION 3.6)
project(cgproxy VERSION 3.7)
add_executable(cgattach cgattach.cpp)
install(TARGETS cgattach DESTINATION /usr/bin

View File

@@ -84,7 +84,7 @@ case $i in
ip -6 route flush table $table
## may not exist, just ignore, and tracking their existence is not reliable
iptables -t nat -D POSTROUTING -m owner ! --socket-exists -j MASQUERADE &> /dev/null
ip6tables -t nat -D POSTROUTING -m owner ! --socket-exists -j MASQUERADE &> /dev/null
ip6tables -t nat -D POSTROUTING -m owner ! --socket-exists -s fc00::/7 -j MASQUERADE &> /dev/null
exit 0
;;
--config=*)
@@ -197,7 +197,7 @@ DOC
if $enable_gateway; then
iptables -t nat -A POSTROUTING -m owner ! --socket-exists -j MASQUERADE
ip6tables -t nat -A POSTROUTING -m owner ! --socket-exists -j MASQUERADE
ip6tables -t nat -A POSTROUTING -m owner ! --socket-exists -s fc00::/7 -j MASQUERADE # only masquerade ipv6 private address
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.forwarding=1
echo "gateway enabled"

View File

@@ -46,7 +46,7 @@ It aslo supports global transparent proxy and gateway proxy. See [Global transpa
mkdir build && cd build && cmake .. && make && sudo make install
```
- It is alreay in [archlinux AUR](https://aur.archlinux.org/packages/cgproxy/).
- It is alreay in [archlinux AUR](https://aur.archlinux.org/packages/cgproxy-git/).
- DEB and RPM are packaged in [release page](https://github.com/springzfx/cgproxy/releases).