此方案使用 Docker 运行 V2Fly (V2Ray),采用 network_mode: host 以获得最佳网络性能。
- 创建一个新文件:
vim deploy_v2fly.sh。 - 将
deploy_v2fly.sh的内容粘贴进去。 - 赋予权限并运行:
| # usage: multi ssh the-host{0,1,2} | |
| function multi { | |
| cmd=$1 | |
| shift | |
| if [ -z "$TMUX" ]; then | |
| session="multi-${cmd}-$(head -c 4 /dev/urandom | base64 | tr '/+' '_-' | tr -d '=')" | |
| tmux new -d -s "${session}" | |
| else |
| #!/bin/bash | |
| # brew install jq | |
| # brew install qrencode | |
| config_file=v2rayx*.json | |
| rss_file=rss.txt | |
| cat $config_file | \ | |
| jq --raw-output ' |
enable bbrplus on debian 9 and above
git clone https://github.com/Xaster/bbrplus-debian.git
cd bbrplus-debian
# run as root
make && make install
sysctl -w net.core.default_qdisc=fqsysctl -w net.ipv4.tcp_congestion_control=bbrplus
This program adds proxy support to ssh. Once installed, ssh will obey
the ssh_proxy environment variable (or all_proxy as a fallback) and
will try to connect to the server through that proxy. Example:
export ssh_proxy="socks5://10.139.2.1:8066"
ssh example.com # will connect through SOCKS5 proxy| #!/usr/bin/env python | |
| """ | |
| xsync.py by zjx20 | |
| http://github.com/zjx20/xsync/ | |
| This script will watch a local directory and on change will | |
| sync to a remote directory. The script can be easily modified | |
| to do whatever you want on a change event. | |
| requires: pip install 'watchdog==0.8.3' |
| /* | |
| * Gmux driver for Apple laptops | |
| * | |
| * Copyright (C) Canonical Ltd. <seth.forshee@canonical.com> | |
| * Copyright (C) 2010-2012 Andreas Heider <andreas@meetr.de> | |
| * Copyright (C) 2015 Lukas Wunner <lukas@wunner.de> | |
| * | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License version 2 as | |
| * published by the Free Software Foundation. |
| wget https://github.com/xtaci/kcptun/releases/download/v20170525/kcptun-linux-amd64-20170525.tar.gz | |
| tar xvf kcptun-linux-amd64-20170525.tar.gz | |
| sudo mv server_linux_amd64 /usr/local/bin/kcptun_server | |
| sudo mv client_linux_amd64 /usr/local/bin/kcptun_client | |
| sudo mkdir -p /etc/kcptun | |
| sudo bash -c "cat <<EOT > /etc/kcptun/server_conf.json | |
| { | |
| \"listen\": \":4321\", | |
| \"target\": \"127.0.0.1:8421\", |
| # should install aria2c from latest source | |
| # requirements: sudo apt install libgnutls-dev nettle-dev libgmp-dev libssh2-1-dev libc-ares-dev libxml2-dev zlib1g-dev libsqlite3-dev pkg-config libcppunit-dev autoconf automake autotools-dev autopoint libtool | |
| #sudo apt-get install -y aria2 | |
| sudo useradd aria2 | |
| sudo mkdir /aria2 | |
| sudo mkdir /aria2/dl | |
| sudo mkdir /aria2/log | |
| sudo touch /aria2/aria2.session | |
| sudo bash -c "cat <<EOT > /aria2/aria2.conf |