timqian / my-notes

https://github.com/timqian/my-notes/issues
7 stars 2 forks source link

aws shadowsocks 配置 #74

Open timqian opened 7 years ago

timqian commented 7 years ago

Server

After launch an unbuntu instance in AWS do the following things:

# become sudo user
sudo -s 
apt-get update

# install pip
apt-get install python-pip

# install shadowsocks
pip install shadowsocks

# (Optional) if pip install throws "locale.Error: unsupported locale setting". Run the following command and reinstall shadowsocks
# Ref: http://blog.csdn.net/qq_33232071/article/details/51108062
$ export LC_ALL=C
vim /etc/shadowsocks.json

{
    "server":"0.0.0.0",
    "server_port":8338,
    "local_address":"127.0.0.1",
    "local_port":1080,
    "password":"yourpassword",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open":false
}

2017-10-09 update 8338 port 好像被我党禁了,改用 2333 端口 work,,2333

Ref:

官方使用说明 trouble shooting ~已失效~

timqian commented 6 years ago

Clients

timqian commented 5 years ago

better shadowsocks https://github.com/shadowsocks/ShadowsocksX-NG

timqian commented 4 years ago

v2ray on aws

config on server

# install on ubuntu
wget https://install.direct/go.sh
sudo bash go.sh # remember the PORT and UUID

# start
sudo systemctl start v2ray

# see config file on ubuntu
cat /etc/v2ray/config.json

open the PORT for inbound to the instance

config on client

sample json

{
  "inbounds": [
    {
      "port": 1080, // 监听端口
      "protocol": "socks", // 入口协议为 SOCKS 5
      "sniffing": {
        "enabled": true,
        "destOverride": ["http", "tls"]
      },
      "settings": {
        "auth": "noauth"  //socks的认证设置,noauth 代表不认证,由于 socks 通常在客户端使用,所以这里不认证
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "vmess", // 出口协议
      "settings": {
        "vnext": [
          {
            "address": "serveraddr.com", // 服务器地址,请修改为你自己的服务器 IP 或域名
            "port": 16823,  // 服务器端口
            "users": [
              {
                "id": "",  // 用户 ID,必须与服务器端配置相同
                "alterId": 64 // 此处的值也应当与服务器相同
              }
            ]
          }
        ]
      }
    }
  ]
}

configure local SOCKS Host to: 127.0.0.1:1080

ref: https://toutyrater.github.io/

timqian commented 4 years ago

v2ray clients

timqian commented 3 years ago

最近增加了 clashX + trojan 的使用, 速度还可以. 可以在 clash 文档里找到更多相关协议

clash doc: https://github.com/Dreamacro/clash/wiki/configuration config clash using trojan: https://hijk.pp.ua/clashx-config-trojan-tutorial/