Skip to content

Commit 69b08f0

Browse files
author
bol-van
committed
install_easy
1 parent ec60218 commit 69b08f0

File tree

18 files changed

+1872
-5
lines changed

18 files changed

+1872
-5
lines changed

common/installer.sh

Lines changed: 803 additions & 0 deletions
Large diffs are not rendered by default.

config.default

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ NFQWS2_UDP_PKT_IN=0
7575
# hostlist markers are replaced to empty string if MODE_FILTER does not satisfy
7676
# <HOSTLIST_NOAUTO> appends ipset/zapret-hosts-auto.txt as normal list
7777
NFQWS2_OPT="
78-
--filter-tcp=80 --payload=http_req --lua-desync=fake:blob=fake_default_http:tcp_md5 --lua-desync=multisplit:pos=method+2 <HOSTLIST> --new
79-
--filter-tcp=443 --payload=tls_client_hello --lua-desync=fake:blob=fake_default_tls:tcp_md5:tcp_seq=-10000 --lua-desync=multidisorder:pos=1,midsld <HOSTLIST> --new
80-
--filter-udp=443 --payload=quic_initial --lua-desync=fake:blob=fake_default_quic:repeats=6 <HOSTLIST_NOAUTO>
78+
--filter-tcp=80 --filter-l7=http <HOSTLIST> --payload=http_req --lua-desync=fake:blob=fake_default_http:tcp_md5 --lua-desync=multisplit:pos=method+2 --new
79+
--filter-tcp=443 --filter-l7=tls <HOSTLIST> --payload=tls_client_hello --lua-desync=fake:blob=fake_default_tls:tcp_md5:tcp_seq=-10000 --lua-desync=multidisorder:pos=1,midsld --new
80+
--filter-udp=443 --filter-l7=quic <HOSTLIST_NOAUTO> --payload=quic_initial --lua-desync=fake:blob=fake_default_quic:repeats=6
8181
"
8282

8383
# none,ipset,hostlist,autohostlist
@@ -97,7 +97,6 @@ FLOWOFFLOAD=donttouch
9797
# or leave them commented if its not router
9898
# it's possible to specify multiple interfaces like this : IFACE_WAN="eth0 eth1 eth2"
9999
# if IFACE_WAN6 is not defined it take the value of IFACE_WAN
100-
#IFACE_LAN=eth0
101100
#IFACE_WAN=eth1
102101
#IFACE_WAN6="ipsec0 wireguard0 he_net"
103102

docs/changes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ v0.2
3838
v0.3
3939
* init.d launch scripts
4040
* init.d: 40-webserver custom script
41+
* install_easy
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
EXEDIR=$(dirname "$RC_SERVICE")
77
EXEDIR="$(cd "$EXEDIR"; pwd)"
88
ZAPRET_BASE="$EXEDIR/../.."
9-
ZAPRET_INIT="$ZAPRET_BASE/init.d/sysv/zapret"
9+
ZAPRET_INIT="$ZAPRET_BASE/init.d/sysv/zapret2"
1010

1111
extra_commands="start_fw stop_fw restart_fw start_daemons stop_daemons restart_daemons reload_ifsets list_ifsets list_table"
1212
description="extra commands :"

init.d/pfsense/zapret2.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
# this file should be placed to /usr/local/etc/rc.d and chmod 755
4+
5+
# copy 'lua' dir there
6+
ZDIR=/usr/local/etc/zapret2
7+
8+
# prepare system
9+
10+
kldload ipfw
11+
kldload ipdivert
12+
13+
# for older pfsense versions. newer do not have these sysctls
14+
sysctl net.inet.ip.pfil.outbound=ipfw,pf
15+
sysctl net.inet.ip.pfil.inbound=ipfw,pf
16+
sysctl net.inet6.ip6.pfil.outbound=ipfw,pf
17+
sysctl net.inet6.ip6.pfil.inbound=ipfw,pf
18+
19+
# required for newer pfsense versions (2.6.0 tested) to return ipfw to functional state
20+
pfctl -d ; pfctl -e
21+
22+
# add ipfw rules and start daemon
23+
24+
ipfw delete 100
25+
ipfw add 100 divert 990 tcp from any to any 80,443 out not diverted not sockarg
26+
pkill ^dvtws2$
27+
dvtws2 --daemon --port 990 --lua-init=@$ZDIR/zapret-lib.lua --lua-init=@$ZDIR/zapret-antidpi.lua --lua-desync=multisplit

init.d/runit/zapret2/finish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
/opt/zapret2/init.d/sysv/zapret2 stop

init.d/runit/zapret2/run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
/opt/zapret2/init.d/sysv/zapret2 start
3+
exec chpst -b zapret2 sleep infinity

init.d/s6/zapret2/down

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/execlineb -P
2+
exec /opt/zapret2/init.d/sysv/zapret2 stop

init.d/s6/zapret2/type

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oneshot

init.d/s6/zapret2/up

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/execlineb -P
2+
exec /opt/zapret2/init.d/sysv/zapret2 start

0 commit comments

Comments
 (0)