v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.31k stars 8.94k forks source link

潘多拉固件路由器上如何安装,哪位朋友指导一下,谢谢 #448

Closed dcliubing closed 7 years ago

dcliubing commented 7 years ago

root@192.168.1.1's password:

BusyBox v1.22.1 (2015-06-08 16:22:27 CST) built-in shell (ash) Enter 'help' for a list of built-in commands.


_ __ _ \ __ _ _ ) ____ __ ) / ` ' \ / ` / _ \ '_/ ` \ / \ \/ / _/ ( (_ (_) (_ _) (_) > < _ _, _ _ _, ___/ _ _, _/ \//\\
PandoraBox SDK Platform
The Core of SmartRouter
Copyright 2013-2015 D-Team Technology Co.,Ltd.SZ
http://www.pandorabox.org.cn
__

Base on OpenWrt BARRIER BREAKER (14.09, r1024)


应该用v2ray-v2.27-linux-mips这个对吗?自动安装脚本用不了,谢谢大家
dcliubing commented 7 years ago

想实现透明代理。

dcliubing commented 7 years ago

小米mini路由器

husy8 commented 7 years ago

自动安装脚本用不了

首先下载脚本至PC上:

root@linuxenv:~# wget https://github.com/v2ray/v2ray-core/raw/master/release/install-release.sh

编辑脚本,将以下字段:

sysAcrh(){
    ARCH=$(uname -m)
    if [[ "$ARCH" == "i686" ]] || [[ "$ARCH" == "i386" ]]; then
        VDIS="32"
    elif [[ "$ARCH" == *"armv7"* ]] || [[ "$ARCH" == "armv6l" ]]; then
        VDIS="arm"
    elif [[ "$ARCH" == *"armv8"* ]]; then
        VDIS="arm64"
    fi
    return 0
}

更改为:

sysAcrh(){
    ARCH=$(uname -m)  # 这行其实可以删去,为避免出现什么问题,暂时保留
    VDIS=mips
    return 0
}

保存并退出。重新运行脚本再试。

dcliubing commented 7 years ago

[root@PandoraBox_91B8:/tmp]#./go.sh --version v2.27 --local v2ray-linux-mip s.zip Installing V2Ray v2.27 on mips Extracting V2Ray package to /tmp/v2ray. Archive: /tmp/v2ray/v2ray.zip inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/readme.md inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/systemd/v2ray.service inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/systemv/v2ray inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/v2ray inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/v2ray.sig inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/vpoint_socks_vmess.json inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/vpoint_vmess_freedom.json PORT:18452 UUID:0d4658e7-fadc-452e-94b8-e4a7fa4a168f V2Ray v2.27 is installed. [root@PandoraBox_91B8:/tmp]#service v2ray start -ash: service: not found

没有提示错误,但是为什么启动不了呢 @wtlusvm

husy8 commented 7 years ago

root@linuxenv:~# systemctl start v2ray

或者手动启动:

root@linuxenv:~# /usr/bin/v2ray/v2ray --config /etc/v2ray/config.json

dcliubing commented 7 years ago

谢谢回复 @wtlusvm [root@PandoraBox_91B8:/usr/bin/v2ray]#systemctl start v2ray -ash: systemctl: not found [root@PandoraBox_91B8:/usr/bin/v2ray]#v2ray --config /etc/v2ray/config.json -ash: v2ray: Permission denied [root@PandoraBox_91B8:/usr/bin/v2ray]#./v2ray ./v2ray: line 1: syntax error: unexpected "(" [root@PandoraBox_91B8:/usr/bin/v2ray]#

dcliubing commented 7 years ago

[root@PandoraBox_91B8:/usr/bin/v2ray]#/usr/bin/v2ray/v2ray --config /etc/v2ray/c onfig.json /usr/bin/v2ray/v2ray: line 1: syntax error: unexpected "(" @wtlusvm

husy8 commented 7 years ago

看看有没有/etc/v2ray/config.json这个文件,提示是配置文件的问题。你可以新建个配置文件,比如路径是/tmp/config.json,那就执行

root@linuxenv:~# /usr/bin/v2ray/v2ray --config /tmp/config.json

dcliubing commented 7 years ago

有/etc/v2ray/config.json此文件@wtlusvm

husy8 commented 7 years ago

替换的时候出问题了吧,把压缩包里的vpoint_vmess_freedom.json改名成config.json传到/etc/v2ray/config.json试试

dcliubing commented 7 years ago

回家试一下,

dcliubing commented 7 years ago

[root@PandoraBox_91B8:/tmp]#./install-release.sh --version v2.27 --local v2ray-l inux-mips.zip Install V2Ray via local file Extracting V2Ray package to /tmp/v2ray. Archive: v2ray-linux-mips.zip inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/readme.md inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/systemd/v2ray.service inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/systemv/v2ray inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/v2ray inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/v2ray.sig inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/vpoint_socks_vmess.json inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/vpoint_vmess_freedom.json The local V2Ray can not be installed in mips system. 不修改脚本是这样的

dcliubing commented 7 years ago

[root@PandoraBox_91B8:/tmp]#./goo.sh --version v2.27 --local v2ray-linux-mips.zip Installing V2Ray v2.27 on mips Extracting V2Ray package to /tmp/v2ray. Archive: /tmp/v2ray/v2ray.zip inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/readme.md inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/systemd/v2ray.service inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/systemv/v2ray inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/v2ray inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/v2ray.sig inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/vpoint_socks_vmess.json inflating: /tmp/v2ray/v2ray-v2.27-linux-mips/vpoint_vmess_freedom.json cp: can't stat '/tmp/v2ray/v2ray-v2.27-linux-64/v2ray': No such file or directory V2Ray v2.27 is installed. go.sh脚本不修改是这样

dcliubing commented 7 years ago

[root@PandoraBox_91B8:/usr/bin/v2ray]# /usr/bin/v2ray/v2ray --config /tmp/config .json /usr/bin/v2ray/v2ray: line 1: syntax error: unexpected "("

dcliubing commented 7 years ago

修改脚本可以安装,但是没有服务,手动启动的话报上面的错误

dcliubing commented 7 years ago

我上网查了一下,是不是小米mini的架构应该是mipsle.......... [root@PandoraBox_91B8:/tmp]#./install-release.sh --version v2.27 --local v2ray-l inux-mipsle.zip Install V2Ray via local file Extracting V2Ray package to /tmp/v2ray. Archive: v2ray-linux-mipsle.zip inflating: /tmp/v2ray/v2ray-v2.27-linux-mipsle/readme.md inflating: /tmp/v2ray/v2ray-v2.27-linux-mipsle/systemd/v2ray.service inflating: /tmp/v2ray/v2ray-v2.27-linux-mipsle/systemv/v2ray inflating: /tmp/v2ray/v2ray-v2.27-linux-mipsle/v2ray inflating: /tmp/v2ray/v2ray-v2.27-linux-mipsle/v2ray.sig inflating: /tmp/v2ray/v2ray-v2.27-linux-mipsle/vpoint_socks_vmess.json inflating: /tmp/v2ray/v2ray-v2.27-linux-mipsle/vpoint_vmess_freedom.json PORT:10133 UUID:7ba49728-4049-464e-a853-b92cffa0763c V2Ray v2.27 is installed. [root@PandoraBox_91B8:/tmp]#service v2ray start -ash: service: not found [root@PandoraBox_91B8:/tmp]#cd /usr/bin/v2ray [root@PandoraBox_91B8:/usr/bin/v2ray]#./v2ray V2Ray v2.27 (One for all) 20170511 An unified platform for anti-censorship. Main: config file not readable > open /usr/bin/v2ray/config.json: no such file o r directory

[root@PandoraBox_91B8:/usr/bin/v2ray]#./v2ray --config /etc/v2ray/c V2Ray v2.27 (One for all) 20170511 An unified platform for anti-censorship. Main: config file not readable > open /etc/v2ray/c: no such file or directory [root@PandoraBox_91B8:/usr/bin/v2ray]#./v2ray --config /etc/v2ray/config.json V2Ray v2.27 (One for all) 20170511 An unified platform for anti-censorship. 2017/05/17 18:26:42 [Debug]App|Proxyman|Inbound: creating tcp worker on 0.0.0.0: 10133 2017/05/17 18:26:42 [Info]Transport|Internet|TCP: listening TCP on 0.0.0.0:10133

这算是启动成功了吗@wtlusvm

husy8 commented 7 years ago

是哒,成功了,你看看能不能把v2ray加到启动项里,每次都要在bash启动太麻烦了。

angerbaby23456 commented 7 years ago

那位打神知道,在手机上v2ray能用,在电脑上不能用

husy8 commented 7 years ago

@dcliubing 解决了就关掉这个Issue吧 @angerbaby23456 已经开了个Issue就静等解答吧

dcliubing commented 7 years ago

2017/05/19 15:02:16 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp xxxxxxxxxx: getsockopt: connection refused dial tcp xxxxxxxxxx: getsockopt: connection timed out dial tcp xxxxxxxxxx: getsockopt: connection refused] > Retry: all retry attempts failed 2017/05/19 15:02:16这个时间和系统时间显示不一致,相差8个小时

dcliubing commented 7 years ago

但是VPS 和路由器上面分别运行date显示时间是一样的

dcliubing commented 7 years ago

路由上配置 { "log" : { "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log", "loglevel": "warning" }, "inbound": { "port": 20088, "listen": "0.0.0.0", "protocol": "dokodemo-door", "settings": { "address": "", "network": "tcp", "timeout": 0, "followRedirect": true } },

"outbound": {

"protocol": "vmess", "settings": { "vnext": [ { "address": "xxxxxxxx", "port": xxxxxxxx, "users": [ { "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alterId": 64, "security": "auto" } ] } ] } },

"streamSettings":{ "network":"kcp", "kcpSettings": { "mtu": 1350, "tti": 20, "uplinkCapacity": 5, "downlinkCapacity": 100, "congestion": false, "readBufferSize": 1, "writeBufferSize": 1, "header": { "type": "none" } } },

"outboundDetour": [ { "protocol": "blackhole", "settings": {}, "tag": "blocked" } ], "routing": { "strategy": "rules", "settings": { "rules": [ { "type": "field", "ip": [

        "10.0.0.0/8",
        "100.64.0.0/10",
        "127.0.0.0/8",
        "169.254.0.0/16",
        "172.16.0.0/12",
        "192.0.0.0/24",
        "192.0.2.0/24",
        "192.168.0.0/16",
        "198.18.0.0/15",
        "198.51.100.0/24",
        "203.0.113.0/24",
        "::1/128",
        "fc00::/7",
        "fe80::/10"
      ],
      "outboundTag": "blocked"
    }
  ]
}

}, "transport": { "kcpSettings": { "uplinkCapacity": 2, "downlinkCapacity": 10 } } }

dcliubing commented 7 years ago

服务器端配置 { "log" : { "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log", "loglevel": "info" }, "inbound": { "port": XXXXX, "protocol": "vmess", "settings": { "clients": [ { "id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "level": 1, "alterId": 64 } ] }, "streamSettings":{ "network":"kcp", "kcpSettings": { "mtu": 1350, "tti": 20, "uplinkCapacity": 5, "downlinkCapacity": 100, "congestion": false, "readBufferSize": 1, "writeBufferSize": 1, "header": { "type": "none" } } } },

"outbound": { "protocol": "freedom", "settings": {} }, "outboundDetour": [ { "protocol": "blackhole", "settings": {}, "tag": "blocked" } ], "routing": { "strategy": "rules", "settings": { "rules": [ { "type": "field", "ip": [ "0.0.0.0/8", "10.0.0.0/8", "100.64.0.0/10", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.2.0/24", "192.168.0.0/16", "198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "::1/128", "fc00::/7", "fe80::/10" ], "outboundTag": "blocked" } ] } }, "transport": { "kcpSettings": { "uplinkCapacity": 2, "downlinkCapacity": 10 } } }