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
[General] | |
#我的注释都是 # 开头,所以如果你用 vim,直接 :g/^#/d 就可以一次性清除所有注释 | |
#开头这段skip包含以下几个目的:1,私网IP跳过,提高内网性能;2,苹果的一些服务跳过,比如公共热点wifi要先测试captive.apple.com。可解决很多内网的 TCP毛病,例如 kodi remote软件无法遥控 | |
skip-proxy = 10.0.0.0/8,169.254/16,172.16.0.0/12,192.168.0.0/16,224.0.0.0/4, localhost, *.local,api.smoot.apple.com,configuration.apple.com,xp.apple.com,smp-device-content.apple.com,guzzoni.apple.com,captive.apple.com,*.ess.apple.com,*.push.apple.com,*.push-apple.com.akadns.net | |
#下面这一段则是完全跳过 Surge,最重要的一个是让 UDP包可以传输,解决很多内网毛病,例如DLNA,NFS或者btsync等组播类/UDP类应用 | |
bypass-tun = 10.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0/4, 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 5 |
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
#!/bin/sh | |
# Set your Server Name 设置成你的域名或者 IP | |
# | |
SERVER="SOMETHING.your.ServeName" | |
VPN_PASSWORD="$(LC_CTYPE=C tr -dc 'A-HJ-NPR-Za-km-z2-9' < /dev/urandom | head -c 12)" | |
#VPN_PASSWORD_ENC=$(openssl passwd -1 "$VPN_PASSWORD") | |
UUID1=$(/usr/bin/uuidgen -r) | |
UUID2=$(/usr/bin/uuidgen -r) | |
UUID3=$(/usr/bin/uuidgen -r) | |
sed -i.bak /$1/d /etc/ipsec.secrets |
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
r4---sn--cxaaj5o5q5-tt16.googlevideo.com | |
r2---sn--u2oxu-2v16.googlevideo.com | |
r3---sn--q5u5bgv02-3c26.googlevideo.com | |
r7---sn--w5nuxa-o536.googlevideo.com | |
r1---sn--nx5e6n76.googlevideo.com | |
r2---sn--nx5e6n76.googlevideo.com | |
r3---sn--nx5e6n76.googlevideo.com | |
r4---sn--nx5e6n76.googlevideo.com | |
r5---sn--nx5e6n76.googlevideo.com | |
r6---sn--nx5e6n76.googlevideo.com |
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
#!/bin/sh | |
reaverCMD() | |
{ | |
reaver -i mon0 -b $1 -v -a -S -N -r 100:60 $2 >>/var/log/reaver.pin.log & | |
tmp_pid=$(ps a| grep reaver | grep -v grep | awk '{print $1}' ); | |
echo $tmp_pid; | |
} | |
while true : | |
do |
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
#!/bin/sh | |
# | |
# Startup script for the Supervisor server | |
# | |
# chkconfig: - 90 10 | |
# description: Supervisor is a client/server system that allows its users to \ | |
# monitor and control a number of processes on UNIX-like \ | |
# operating systems. | |
# | |
# processname: supervisord |
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
#! /bin/sh | |
#! /usr/bin/expect -f | |
certtool --generate-privkey --outfile $1-key.pem | |
sed -i "1ccn = "${1}"" client.tmpl | |
sed -i "3cemail = ${1}@abc.org" client.tmpl | |
certtool --generate-certificate --load-privkey $1-key.pem --load-ca-certificate ca-cert.pem --load-ca-privkey ca-key.pem --template client.tmpl --outfile $1-cert.pem | |
openssl pkcs12 -export -inkey $1-key.pem -in $1-cert.pem -name "$1 VPN Client Cert" -certfile ca-cert.pem -out $1.cert.p12 |
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
#!/bin/bash | |
## Main reference https://raymii.org/s/tutorials/IPSEC_vpn_with_CentOS_7.html | |
yum -y install epel-release | |
yum -y install haveged strongswan | |
/etc/init.d/haveged start | |
chkconfig haveged on | |
cd /etc/strongswan || exit | |
cat > strongswan.conf <<'EOF' |
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
#!/bin/sh | |
export MAKEOBJDIRPREFIX=/srv/obj | |
export SRCROOT=/srv | |
# build kernel | |
svn co svn://svn.freebsd.org/base/head $SRCROOT/head | |
cd $SRCROOT/head | |
make buildkernel KERNCONF=RPI-B | |
make installkernal KERNCONF=RPI-B |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/encoding/ AnyConnectProfile.xsd"> | |
<ClientInitialization> | |
<UseStartBeforeLogon UserControllable="false">false</UseStartBeforeLogon> | |
<StrictCertificateTrust>false</StrictCertificateTrust> | |
<RestrictPreferenceCaching>false</RestrictPreferenceCaching> | |
<RestrictTunnelProtocols>IPSec</RestrictTunnelProtocols> | |
<BypassDownloader>true</BypassDownloader> | |
<WindowsVPNEstablishment>AllowRemoteUsers</WindowsVPNEstablishment> |
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
reg add "HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config" /v "AnnounceFlags" /t REG_DWORD /d 5 /f | |
reg add "HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /v "Enabled" /t REG_DWORD /d 1 /f | |
net stop w32time && net start w32time |
NewerOlder