certbot -d xxx.com --manual --preferred-challenges dns certonly
npm install forever
git clone https://github.com/c9/core.git ~/c9sdk
cd c9sdk
scripts/install-sdk.sh
forever start ~/c9sdk/server.js -w ~/ --auth user:pass --collab -l 8181
logoutput: /var/log/socks.log
# The listening network interface or address.
internal: 0.0.0.0 port=10800
# The proxying network interface or address.
external: eth0
# socks-rules determine what is proxied through the external interface.
socksmethod: username
# client-rules determine who can connect to the internal interface.
clientmethod: none
client pass {
from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
log: connect disconnect error
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
protocol: tcp udp
}
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
function refresh_gateway {
sudo sed -i '' '/gateway/d' /etc/hosts
echo $(netstat -rn | awk '/default/ {print $2}'| head -n1) "gateway" | sudo tee -a /etc/hosts
}
for port in 22 440 441 442 443 444 39186 39185 9993; do
iptables -A INPUT -p tcp --dport $port -j ACCEPT
iptables -A OUTPUT -p tcp --dport $port -j ACCEPT
iptables -A INPUT -p udp --dport $port -j ACCEPT
iptables -A OUTPUT -p udp --dport $port -j ACCEPT
done
iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535
iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535
iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.122.0/24 -o eth0 -j SNAT --to-source 192.168.122.1
wget https://raw.githubusercontent.com/overleaf/overleaf/master/docker-compose.yml
docker compose up
tlmgr option repository http://mirrors.aliyun.com/CTAN/systems/texlive/tlnet/
docker exec -it sharelatex bash
cd /usr/local/texlive
cp -a 2020 2021
wget http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh
sh update-tlmgr-latest.sh -- --upgrade
tlmgr update --self --all
luaotfload-tool -fu
docker exec sharelatex tlmgr install scheme-full
docker commit sharelatex sharelatex/sharelatex:with-texlive-full
docker exec sharelatex /bin/bash -c "cd /var/www/sharelatex; grunt user:create-admin [email protected]"
stream {
upstream srv {
server 1.1.1.1:22;
}
server {
listen 10022;
proxy_pass srv;
}
}
sudo netstat -tunlp
git clone https://github.com/rofl0r/proxychains-ng
cd proxychains-ng
./configure --prefix=/usr --sysconfdir=/etc
make
make install
make install-config
cd .. && rm -rf proxychains-ng
cat << ! > /etc/proxychains.conf
strict_chain
proxy_dns
[ProxyList]
socks5 127.0.0.1 7890
!
wget https://download.qemu.org/qemu-6.1.0-rc0.tar.xz
tar -xaf qemu-6.1.0-rc0.tar.xz
cd qemu-6.1.0-rc0
yum install ninja-build glib2-devel bzip2 pixman-devel zlib-devel
./configure
make -j
make install
qemu-system-x86_64 \
-nographic \
-smp cores=6 \
-m 4096 \
-drive file=$PWD/Disk.qcow2,if=virtio,cache=writethrough
[https://www.ghl.name/archives/how-to-use-tun2socks-to-set-up-global-proxy-on-linux.html]
# installation
git clone https://github.com/ambrop72/badvpn.git
cd badvpn/
mkdir build
cd build
cmake ..
make -j
sudo make install
# ip forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
ip tuntap add dev tun2 mode tun
ifconfig tun2 192.168.168.0/24 netmask 255.255.255.0
route add default gw 192.168.168.2
iptables -t nat -A POSTROUTING ! -d 192.168.123.0/24 -o tun2 -j MASQUERADE
# tun2socks launch
badvpn-tun2socks --netif-ipaddr 192.168.168.2 --netif-netmask 255.255.255.0 --socks-server-addr "192.168.123.100:7890" --tundev "tun2" --socks5-udp --udpgw-transparent-dns
yum install @GNOME gdm gcr tigervnc-server
vncpasswd
vncserver
# ~/.ssh/config
Host *
ForwardAgent yes
ForwardX11 yes
sudo apt-get install xauth
sudo yum install xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps
find . -print0 -type f| xargs -0 ...
find . -type f| xargs -d "\n"
curl -s https://install.zerotier.com/ | sudo bash
sudo systemctl start zerotier-one.service
sudo systemctl enable zerotier-one.service
sudo zerotier-cli join $NETWORK_ID
cd /var/lib/zerotier-one
sudo zerotier-idtool initmoon identity.public |sudo tee moon.json
sudo sed -i 's/"stableEndpoints": \[\]/"stableEndpoints": ["0.0.0.0\/9993"]/g' moon.json
zerotier-idtool genmoon moon.json
sudo mkdir moons.d
sudo mv *.moon moons.d
sudo systemctl restart zerotier-one
curl -s https://install.zerotier.com/ | sudo bash
sudo systemctl start zerotier-one.service
sudo systemctl enable zerotier-one.service
sudo zerotier-cli join $NETWORD_ID
sudo zerotier-cli orbit $MOON_ID $MOON_ID
sudo zerotier-cli listpeers