Skip to content

Commit

Permalink
only masquerade ipv6 private address
Browse files Browse the repository at this point in the history
  • Loading branch information
springzfx committed May 8, 2020
1 parent d3b2dc0 commit 6c24c68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions cgroup-tproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=*)
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down

0 comments on commit 6c24c68

Please sign in to comment.