Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(init): ua2f auto start #35

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/ua2f.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

config ua2f 'enabled'
option enabled '0'
option enabled '1'

config ua2f 'firewall'
option handle_fw '1'
Expand Down
2 changes: 2 additions & 0 deletions files/ua2f.init
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2020 Zxilly <zhouxinyu1001@gmail.com>
# Copyright (C) 2021 Tianling Shen <cnsztl@immortalwrt.org>
# Copyright (C) 2021 SunBK201 <sunbk201gm@gmail.com>

USE_PROCD=1

Expand Down Expand Up @@ -50,6 +51,7 @@ start_service() {
$IPT_M -A FORWARD -p tcp -m conntrack --ctdir ORIGINAL -j ua2f
$IPT_M -A FORWARD -p tcp -m conntrack --ctdir REPLY

# 处理流向内网的流量
[ "$handle_intranet" -eq "1" ] && {
local wan="$(route -n | grep UG | awk '{print $2}')"

Expand Down