diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ad636c..6e88d03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,11 +23,12 @@ install(FILES cgroup-tproxy.sh DESTINATION /usr/share/cgproxy/scripts/) -## deb pack +## package for deb and rpm set(CPACK_GENERATOR "DEB;RPM") set(CPACK_PACKAGE_NAME "cgproxy") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "cgproxy will transparent proxy anything running in specific cgroup.It aslo supports global transparent proxy and gateway proxy") +## deb pack set(CPACK_DEBIAN_PACKAGE_NAME "cgproxy") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "x86_64") set(CPACK_DEBIAN_PACKAGE_DEPENDS "systemd") @@ -38,10 +39,12 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "springzfx@gmail.com") set(CONTROL_DIR ${CMAKE_SOURCE_DIR}/control) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CONTROL_DIR}/postinst;${CONTROL_DIR}/prerm") +## rpm pack set(CPACK_RPM_PACKAGE_ARCHITECTURE, "x86_64") set(CPACK_RPM_PACKAGE_REQUIRES "systemd") set(CPACK_RPM_PACKAGE_GROUP "network") set(CPACK_RPM_PACKAGE_URL "https://github.com/springzfx/cgproxy") +set(CONTROL_DIR ${CMAKE_SOURCE_DIR}/control) set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CONTROL_DIR}/postinst") set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${CONTROL_DIR}/prerm") diff --git a/cgroup-tproxy.sh b/cgroup-tproxy.sh index d9d0afc..ae702a0 100644 --- a/cgroup-tproxy.sh +++ b/cgroup-tproxy.sh @@ -83,7 +83,7 @@ case $i in ip route flush table $table ip -6 rule delete fwmark $mark_proxy lookup $table ip -6 route flush table $table - ## may not exist, just ignore, and tracking their existence is reliable + ## may not exist, just ignore, and tracking their existence is not reliable iptables -t nat -D POSTROUTING -m addrtype ! --src-type LOCAL -j MASQUERADE &> /dev/null ip6tables -t nat -D POSTROUTING -m addrtype ! --src-type LOCAL -j MASQUERADE &> /dev/null exit 0 diff --git a/readme.md b/readme.md index 046a5c4..d89f604 100644 --- a/readme.md +++ b/readme.md @@ -44,7 +44,9 @@ It aslo supports global transparent proxy and gateway proxy. See [Global transpa mkdir build && cd build && cmake .. && make && 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/). + +- DEB and RPM are packaged in [release page](https://github.com/springzfx/cgproxy/releases). ## How to use @@ -170,6 +172,11 @@ sudo systemctl restart cgproxy.service - `systemd-cgls` to see the cgroup hierarchical tree. +- Qv2ray config example + + +![Qv2ray config example](https://i.loli.net/2020/04/28/bdQBzUD37FOgfvt.png) + ## Licences cgproxy is licenced under [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/gpl-2.0)