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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon |
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
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.v2ray</string><!--这个名字必须和文件名一致, 不含.plist--> | |
<key>Program</key> | |
<string>/opt/v2ray/v2ray</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>-config</string> |
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
# TCP | |
iptables -t nat -N V2RAY | |
iptables -t nat -A V2RAY -d 0.0.0.0/8 -j RETURN | |
iptables -t nat -A V2RAY -d 127.0.0.0/8 -j RETURN | |
iptables -t nat -A V2RAY -d 192.168.8.0/24 -j RETURN | |
# From lans redirect to Dokodemo-door's local port | |
iptables -t nat -A V2RAY -s 192.168.8.0/24 -p tcp -j REDIRECT --to-ports 12345 | |
iptables -t nat -A PREROUTING -p tcp -j V2RAY | |
iptables -t nat -A OUTPUT -p tcp -j V2RAY |
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
1. 从input.txt读取每一行,搜索当前目录下以py结尾的文件,看文件是否包含input.txt中的关键字 | |
for i in `cat ~/input.txt`; do find . -type f -name '*.py' | xargs grep -ni -e $i | grep -v "要排除的关键字" | sort; done > ~/scan.log |
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
1. apt-get install dnsmasq | |
2. Create a "Net Tap Device" in "Local Bridge Settings" of Softether Manager. The tap name is "soft" | |
sudo update-rc.d softether defaults |
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
sudo vim /etc/systemd/system/v2ray.service | |
# Append under the [Serivce] tag | |
LimitNOFILE=102400 | |
sudo systemctl daemon-reload | |
sudo systemctl restart v2ray |
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
url=https://***************/post_ip.php?ip= | |
while true | |
do | |
main_ipv4=`ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'|head -n 1` | |
main_ipv6=`ifconfig | awk '/inet6/{print $2}'|head -n 1` | |
curl -k $url"\"$main_ipv4-$main_ipv6\"" | |
sleep 5 | |
done | |
#crontab -e |
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
class TestClass { | |
public: | |
enum MethodEnum { | |
METHOD_1, | |
METHOD_2, | |
METHOD_3 | |
}; | |
std::map<MethodEnum, std::function<void(void)>> method_map; |
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 | |
#set -e | |
# install-wifi - 19/10/2017 - by MrEngman. | |
UPDATE_SELF=${UPDATE_SELF:-1} | |
UPDATE_URI="http://downloads.fars-robotics.net/wifi-drivers/install-wifi" | |
ROOT_PATH=${ROOT_PATH:-"/"} | |
WORK_PATH=${WORK_PATH:-"${ROOT_PATH}/root"} |
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
[global] | |
netbios name = RASPBERRYPI | |
server string = The Raspberrypi File Center | |
workgroup = WORKGROUP | |
protocol = SMB3 | |
smb encrypt = auto | |
# allow follow soft links | |
follow symlinks = yes | |
wide links = yes | |
unix extensions = no |
NewerOlder