zoukankan      html  css  js  c++  java
  • ubuntu 16.04 & 20.04 安装ss与终端穿越

    下面所有xxxxx自行替换为ss(防博客敏感词过滤)

    ubuntu 16.04 安装ss与终端穿越

    安装

    sudo apt-get install software-properties-common -y
    sudo add-apt-repository ppa:max-c-lv/xxxxx-libev -y
    sudo apt-get update
    sudo apt install xxxxx-libev
    

    使用范例,自行替换

    ss-local -s 144.134.129.5 -p 7580 -k "xxxxxxxp" -l 1080 -t 600 -m aes-256-gcm
    

    sudo vim /etc/xxxxx-libev/config.json
    
    {
     "server":"$your_server",
     "server_port":$your_server_port,
     "local_address":"$your-server",
     "local_port":10800,
     "password":"$your_password",
     "timeout":600,
     "method":"aes-256-cfb"
    }
    
    sudo ss-local -c /etc/xxxxx-libev/config.json
    

    开机自启动

    sudo vim /etc/rc.local
    
    ### exit 0 前添加
    nohup ss-local >/dev/null 2>&1 &
    

    终端穿越

    privoxy

    ### install
    sudo apt-get install privoxy
    
    ### update config
    sudo vim /etc/privoxy/config
    
    ### 在4.1末尾添加
    listen-address  localhost:8118
    listen-address  [::1]:8118
    
    ### 在5.2末尾添加
    forward-socks5 / 127.0.0.1:1080 .
    
    ### 重启服务
    sudo /etc/init.d/privoxy restart
    
    ### 配置一下终端的环境
    export http_proxy="127.0.0.1:8118"
    export https_proxy="127.0.0.1:8118"
    
    ### 开机自启动
    sudo vim /etc/rc.local
    ### exit 0 前添加
    sudo /etc/init.d/privoxy start
    
    ### 在/etc/profile的末尾添加如下两句
    export http_proxy="127.0.0.1:8118"
    export https_proxy="127.0.0.1:8118"
    

    polipo

    • Install polipo
    sudo apt-get install polipo
    
    • Edit config file
    sudo vim /etc/polipo/config
    
    • add
    logSyslog = true
    logFile = /var/log/polipo/polipo.log
    proxyAddress = "0.0.0.0"
    socksParentProxy = "127.0.0.1:10800"
    socksProxyType = socks5
    chunkHighMark = 50331648
    objectHighMark = 16384
    serverMaxSlots = 64
    serverSlots = 16
    serverSlots1 = 32
    
    • Restart polipo service
    sudo service polipo stop
    sudo polipo socksParentProxy=localhost:10800
    sudo service polipo start
    
    • ENV(Add to ~/.bashrc)
    export http_proxy=http://127.0.0.1:8123
    export https_proxy=https://127.0.0.1:8123
    git config --global http.proxy socks5://localhost:10800
    git config --global https.proxy socks5://localhost:10800
    
    git config --global http.https://github.com.proxy socks5://127.0.0.1:10800
    git config --global https.https://github.com.proxy socks5://127.0.0.1:10800
    git config --global --unset http.proxy
    git config --global --unset https.proxy
    
    • Test if socks5 can connect google
    curl www.google.com
    

    ubuntu 20.04 安装ss

    终端穿越与16.04一样,安装过程如下

    sudo apt install xxxxx-libev
    
    ### 停止默认的 ss-server 服务并禁用开机自启:
    sudo systemctl stop --now xxxxx-libev.service
    
    ### 从网络服务提供者获取配置,写入 /etc/xxxxx-libev/client.json,运行 ss-local 服务并启用开机自启
    sudo systemctl start --now xxxxx-libev-local@client.service
    
    ### 或者
    ss-local -s 144.134.129.5 -p 7580 -k "xxxxxxxp" -l 1080 -t 600 -m aes-256-gcm
    
  • 相关阅读:
    sed 简明教程
    简明 Vim 练级攻略
    AWK 简明教程
    TCP 的那些事儿(下)
    TCP 的那些事儿(上)
    CentOS 7系统安装配置图解教程
    Google Chrome谷歌/火狐/Safari浏览器开发者工具基本使用教程
    《Ext JS模板与组件基本框架图----组件》
    ExtJS关于组件Component生命周期
    《Ext JS模板与组件基本知识框架图----模板》
  • 原文地址:https://www.cnblogs.com/yifeichongtian/p/14091231.html
Copyright © 2011-2022 走看看