• LIRE图片识别搜索demo--Ubuntu开发


    Ubuntu安装shadowsocks客户端/服务端教程

    1.安装shadowsocks
      sudo apt-get update
      sudo apt-get install python-pip
      sudo apt-get install python-setuptools m2crypto
      sudo pip install shadowsocks
    2.json配置文件
      shadowsocks.json
      {
        "server":"*.*.*.*",
        "server_port":*,
        "local_address":"127.0.0.1",
        "local_port":1080,
        "password":"*******",
        "timeout":300,
        "method":"aes-256-cfb"
      }
    3.后台启动
      sudo sslocal -c ~/shadowsocks.json -d start
    4.开机后台启动
      sudo vi /etc/rc.local
      添加:
      sudo sslocal -c ~/shadowsocks.json -d start

    5.配置代理

      手动代理:Network --> Network proxy --> Method:Manual
        Socks Host: 127.0.0.1 1080

      动态代理:Network --> Network proxy --> Method:Automatic

        输入自定义的代理文件路径:/../../../autoproxy.pac,文件详情见最后

      推荐Chrome安装插件 SwitchyOmega配置代理启动
        配置代理:
        协议:SOCKS5
        服务器:127.0.0.1
        端口:1080
        开启:proxy

    6.注意事项:

      1)未设置开机启动时,需重新启动客户端

      2)动态代理文件路径尽量不要放在经常变动的路径下,推荐系统配置文件路径

      3)开启代理后,推荐使用Chrome浏览器,使用FireFox浏览器时注意在配置中修改代理文件路径(同network中的配置文件)

      4)如果没有上述情况,推荐查看1080端口是否已被占用

      shadowsocks的客户端十分易用,上述情况排查结束,就可以解决问题

    7.network自动代理配置文件

      太大,不可提交,网上有很多

    附录:

    1.Ubuntu云服务器安装shadowsocks服务端

    apt-get install python-pip //安装pip
    pip -V // 校验
    pip install shadowsocks // 安装shadowsocks
    # 注意 Ubuntu 16.4 可直接安装
    apt install shadowsocks

    2.创建配置json文件,这里以多端口为例

    {
        "server":"0.0.0.0",
        "local_address": "127.0.0.1",
        "local_port":1080,
        "port_password":{
                "5210":"rosetta123456",
                "5211":"rosetta123456",
                "5212":"rosetta123456",
                "5213":"rosetta123456",
                "5214":"rosetta123456",
                "5215":"rosetta123456"
            },
        "timeout":300,
        "method":"aes-256-cfb",
        "fast_open": false
    }

    3.后台启动shadowsocks代理服务

    ssserver -c ss.json -d start

    这里:启动 start 重启 restart 关闭 stop

    4.锐速加速,此处为Ubuntu执行脚本

    #!/bin/bash
    
    # Ubuntu/14.04/3.16.0-43-generic/x64
    # Ubuntu/16.04/4.4.0-47-generic/x64
    
    [ -n "`cat /etc/issue | grep "Ubuntu 16.04"`" ] && echo "Ubuntu 16.04" && KER_VER="4.4.0-47-generic"
    [ -n "`cat /etc/issue | grep "Ubuntu 14.04"`" ] && echo "Ubuntu 14.04" && KER_VER="3.16.0-43-generic"
    
    cp /etc/default/grub /etc/default/grub.old
    sed -ir "s/GRUB_DEFAULT=.*/GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux $KER_VER"/g" /etc/default/grub
    # update-grub
    apt-get update
    apt-get install -y linux-image-extra-$KER_VER
    # reboot
    
    mkdir -p /appex
    cat > /appex/appexinstall.sh << TEMPEOF
    wget --no-check-certificate -qO /tmp/appex.sh "https://raw.githubusercontent.com/0oVicero0/serverSpeeder_Install/master/appex.sh" && bash /tmp/appex.sh 'install' << EOF
    
    EOF
    cp /etc/rc.local.old.ruisu /etc/rc.local
    rm /etc/rc.local.old.ruisu
    TEMPEOF
    
    # bash /appex/appexinstall.sh
    # ps aux | grep appex
    
    
    if [ ! -f "/etc/rc.local.old.ruisu" ]; then
        echo "first time run this script, backup the rc.local"
        cp /etc/rc.local /etc/rc.local.old.ruisu
    fi
    # cp /etc/rc.local /etc/rc.local.old.ruisu
    sed -i '$d' /etc/rc.local
    echo "bash /appex/appexinstall.sh" >> /etc/rc.local
    echo "exit 0" >> /etc/rc.local
    chmod 0755 /etc/rc.local
    reboot

     5.锐速--serverSpeeder使用

    #重启锐速
    /appex/bin/serverSpeeder.sh restart
    #启动锐速
    /appex/bin/serverSpeeder.sh start
    #停止锐速
    /appex/bin/serverSpeeder.sh stop
    #查看锐速运行情况
    /appex/bin/serverSpeeder.sh status
  • 相关阅读:
    iOS 国际化
    iOS iOS7 20px 处理
    iOS 导航栏
    android Tab =viewpager+fragmnet
    Android fragment 想activity 传送数据
    sass sublime text 2 gulp ionic
    HTML5 Notification消息通知
    浅谈设备分辨比
    offsetwidth/clientwidth的区别
    移动端网页布局中需要注意事项以及解决方法总结
  • 原文地址:https://www.cnblogs.com/nyatom/p/9341001.html
Copyright © 2020-2023  润新知