mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-11-09 22:12:45 +09:00
* fix worker & fix captha * fixed read config (xxd) snapshot * remove comment * fix snapshot * fixed xray save * move subtitleText -> hint (Xray) * xray config apply via reinstall * apply server config via container reinstall * transport compatibility and xray-core v26 config * seed reality defaults on fresh deploy * server scripts for xray-core v26 (keys, udp, image) * placeholder defaults and hint tooltip control * wire placeholders and hints into settings pages * gate flow and security by transport in UI * encode raw tg link in QR * remove comment * restore telegram-proxy transport mode and domain on server re-scan * remove drop SessionKey, add edit * fixed xray/mtproxy/telemt
29 lines
968 B
Bash
29 lines
968 B
Bash
#!/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 -A INPUT -p tcp --dport $XRAY_SERVER_PORT -j ACCEPT
|
|
iptables -A INPUT -p udp --dport $XRAY_SERVER_PORT -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
|