ReZeroS / LinuxQA

0 stars 0 forks source link

SS config #2

Open ReZeroS opened 6 years ago

ReZeroS commented 6 years ago
  1. Server: Centos 7.4.x kernel 4.17.x

    • Enable bbr

    wget -N --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && bash bbr.sh

    • SS install: python 2.7
    $ yum install m2crypto python-setuptools
    $ easy_install pip
    $ pip install shadowsocks
    • SS config , server replace 0.0.0.0 as your server ip
    /etc/shadowsocks.json
    
    {
      "server":"0.0.0.0",
      "local_address": "127.0.0.1",
      "local_port":1080,
      "port_password": {
           "443": "443",
           "8888": "8888"
       },
      "timeout":300,
      "method":"aes-256-cfb",
      "fast_open": false
    }
    • Firewall config
    $ yum install firewalld
    $ systemctl start firewalld
    $ firewall-cmd --permanent --zone=public --add-port=443/tcp
    $ firewall-cmd --reload
    • Start app as background nohup ssserver -c /etc/shadowsocks.json &
  2. Client : Arch Linux

    pip install shadowsocks

    /etc/shadowsocks.json
    {
      "server":"0.0.0.0",
      "server_port":443,
      "local_address": "127.0.0.1",
      "local_port":1080,
      "password":"123456",
      "timeout":300,
      "method":"aes-256-cfb",
      "fast_open": false
    }

    shadowsocks -c /etc/shadowsocks.config

By the way, if u wanna start it as daemon, u can try https://github.com/shadowsocks/shadowsocks-libev/issues/1949#issuecomment-369467859

or

https://www.cnblogs.com/Meternal/p/8168629.html

tips for permission:

chmod u+x runstart.sh
  1. Browser Chrome would use the system proxy as default. But you could try SwitchyOmega Extension to change your proxy.

  2. git: edit ~/.gitconfig

[http]
    proxy = socks5://127.0.0.1:1080
  1. If you want to change the system proxy, hope this could be useful for you Proxy
ReZeroS commented 5 years ago

FAQ:

Q:

 File "/usr/lib/python2.6/site-packages/pip-18.1-py2.6.egg/pip/_internal/cli/cmdoptions.py", line 75
    binary_only = FormatControl(set(), {':all:'})

A:

# yum install openssl-devel -y
# python get-pip.py --no-cache-dir