mirror of
https://github.com/springzfx/cgproxy.git
synced 2026-03-15 09:32:09 +08:00
only masquerade ipv6 private address
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user