This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############## HEADER HERE | |
# Create new chain | |
iptables -t nat -N SHADOWSOCKS | |
# Ignore your shadowsocks server's addresses | |
# It's very IMPORTANT, just be careful. | |
iptables -t nat -A SHADOWSOCKS -d MY_SS-REDIR_SERVER_IP -j RETURN | |
# Ignore LANs and any other addresses you'd like to bypass the proxy | |
# See Wikipedia and RFC5735 for full list of reserved networks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
filename=$'iptables.shadow' | |
bestroutetb -p custom -o $filename --rule-format=$'iptables -t nat -A SHADOWSOCKS -d %prefix/%mask -j %gw\n' --gateway.net=RETURN --gateway.vpn=ACCEPT --header=$'#!/usr/bin/sh\niptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 1080\niptables -t nat -A SHADOWSOCKS -d MY_SS-REDIR_SERVER_IP -j RETURN\n\n' --footer=$'\niptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 1080\niptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS\n' | |
if [ -f "$filename" ]; then | |
sed -e '/-j ACCEPT/d' $filename > tmp | |
rm $filename | |
mv tmp $filename | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function anonymous( | |
) { | |
(function() { | |
var hostname = window.location.hostname; | |
var currURL = window.location.href; | |
var path = window.location.pathname; | |
var Cookie = { | |
get: function(name) { | |
var cookies = document.cookie.split(';'); | |
for (var i = 0, j = cookies.length; i < j; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILESYSTEM_DEFAULT=s3 | |
FILESYSTEM_PATH=https://cdn.mydomain.com/my-project | |
FILESYSTEM_S3_KEY=******************** | |
FILESYSTEM_S3_SECRET=******************************************* | |
# I use digitalocean space which is compatiable with AWS s3 | |
FILESYSTEM_S3_ENDPOINT=https://sfo1.digitaloceanspaces.com | |
FILESYSTEM_S3_URL=https://cdn.mydomain.com/my-project | |
# I also try this | |
# FILESYSTEM_S3_URL=https://cdn.mydomain.com | |
FILESYSTEM_S3_REGION=sfo1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
goto enable-pacproxy | |
:enable-pacproxy | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://192.168.0.10:8093/pac" /f | |
goto end | |
:disable_proxy |