parent
f6acec53c0
commit
ba4237f1dd
64 changed files with 1933 additions and 336 deletions
26
client/server_scripts/xray/start.sh
Normal file
26
client/server_scripts/xray/start.sh
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This scripts copied from Amnezia client to Docker container to /opt/amnezia and launched every time container starts
|
||||
|
||||
echo "Container startup"
|
||||
ifconfig eth0:0 $SERVER_IP_ADDRESS netmask 255.255.255.255 up
|
||||
|
||||
iptables -A INPUT -i lo -j ACCEPT
|
||||
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
iptables -A INPUT -p icmp -j ACCEPT
|
||||
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
|
||||
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
|
||||
iptables -P INPUT DROP
|
||||
|
||||
ip6tables -A INPUT -i lo -j ACCEPT
|
||||
ip6tables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
ip6tables -A INPUT -p ipv6-icmp -j ACCEPT
|
||||
ip6tables -P INPUT DROP
|
||||
|
||||
# kill daemons in case of restart
|
||||
killall -KILL xray
|
||||
|
||||
# start daemons if configured
|
||||
if [ -f /opt/amnezia/xray/server.json ]; then (xray -config /opt/amnezia/xray/server.json); fi
|
||||
|
||||
tail -f /dev/null
|
||||
Loading…
Add table
Add a link
Reference in a new issue