Git Product home page Git Product logo

openwrt-ssr's Introduction

ShadowsocksR-libev for OpenWrt

简介

本项目是 shadowsocksr-libev 在 OpenWrt 上的移植

ar71xx平台预编译IPK下载

特性

软件包包含 shadowsocksr-libev 的可执行文件,以及luci控制界面

支持SSR客户端、服务端模式(目前只支持部分混淆模式)

支持自动分流,国内IP不走代理,国外IP段走透明代理,不需要再安装chnroute、gfwlist等软件

支持本地域名污染情况下的远程服务器解析,多数情况下无需对dns进行处理

可以和Shadowsocks共存,在openwrt可以通过luci界面切换使用Shadowsocks或ShadowsocksR

兼容SS和SSR服务端,使用SS服务端时,传输协议需设置为origin,混淆插件需设置为plain

编译

  • 从 OpenWrt 的 SDK 编译

    # 以 ar71xx 平台为例
    tar xjf OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2
    cd OpenWrt-SDK-ar71xx-*
    # 安装 feeds
    ./scripts/feeds update packages
    ./scripts/feeds install libpcre
    # 获取 Makefile
    git clone https://github.com/ywb94/openwrt-ssr.git package/openwrt-ssr
    # 选择要编译的包 
    #luci ->3. Applications-> luci-app-shadowsocksR         包含客户端和服务器
    #luci ->3. Applications-> luci-app-shadowsocksR-Client  只包含客户端
    #luci ->3. Applications-> luci-app-shadowsocksR-Server  只包含客户端和服务器
    make menuconfig
    
    #如果没有安装po2lmo,则安装(可选)
    pushd package/openwrt-ssr/tools/po2lmo
    make && sudo make install
    popd
    #编译语言文件(可选)
    po2lmo ./package/openwrt-ssr/files/luci/i18n/shadowsocksr.zh-cn.po ./package/openwrt-ssr/files/luci/i18n/shadowsocksr.zh-cn.lmo
    
    # 开始编译
    make V=99

安装

本软件包依赖库:libopenssl、libpthread、ipset、ip、iptables-mod-tproxy、libpcre,opkg会自动安装

先将编译成功的luci-app-shadowsocksR_*_all.ipk通过winscp上传到路由器的/tmp目录,执行命令:

#opkg update
#opkg install /tmp/luci-app-shadowsocksR_*_all.ipk 

配置

软件包可以通过luci配置,也可以通过配置文件, 配置文件内容为 JSON 格式, 支持的键:

键名 数据类型 说明
server 字符串 服务器地址, 可以是 IP 或者域名
server_port 数值 服务器端口号, 小于 65535
local_port 数值 本地绑定的端口号, 小于 65535
password 字符串 服务端设置的密码
method 字符串 加密方式, 详情参考
timeout 数值 超时时间(秒), 默认 60
protocol 字符串 传输协议,默认"origin"详情参考
obfs 字符串 混淆插件,默认"plain" 详情参考
obfs_param 字符串 混淆插件参数 详情参考

安装启用后自动分流国内、外流量,如需更新国内IP数据库在openwrt上执行"get_chinaip"命令即可:

 # get_chinaip                                                                                                         
 Connecting to ftp.apnic.net (202.12.29.205:80)                                                                                      
 -                     82% |********************************************************************               |  1964k  0:00:10 ETA 
      

截图

luci000

openwrt-ssr's People

Contributors

ywb94 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.