Giter Site home page Giter Site logo

貌似ARM机型不正常-【结论:宿主机 Linux 内核4.19过旧。两个处理办法:1.升级宿主机内核到5.6或以上;2.docker 安装wireguard-go(注意要是arm64版本以适配)】 about warp_unlock HOT 5 CLOSED

ziyocc avatar ziyocc commented on July 22, 2024
貌似ARM机型不正常-【结论:宿主机 Linux 内核4.19过旧。两个处理办法:1.升级宿主机内核到5.6或以上;2.docker 安装wireguard-go(注意要是arm64版本以适配)】

from warp_unlock.

Comments (5)

fscarmen avatar fscarmen commented on July 22, 2024

warp 运行不起来,应该是 /etc/wireguard/wgcf.conf 文件没有生成,检测一下。

我在甲骨文 ARM 上测没有问题哦,连解锁都试了,以下是全部过程。

root@phoenix4:~# bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/warp_unlock/main/docker.sh)
 The current region is US. Confirm press [y] . If you want another regions, please enter the two-digit region abbreviation. (such as hk,sg. Default is US):   
 Please enter Bot Token if you need push the logs to Telegram. Leave blank to skip: 
 
 Install WGCF 
 
--2022-03-20 21:20:08--  https://github.com/ViRb3/wgcf/releases/download/v2.2.12/wgcf_2.2.12_linux_arm64
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/255437195/815dfc39-fc55-48ca-95fe-3fc1f6ddc1ce?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220320%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220320T132008Z&X-Amz-Expires=300&X-Amz-Signature=ef365b16fcd219f0431a59c71c9e53afa6d716ca31be31a4f8ff62fb86a0b6cc&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=255437195&response-content-disposition=attachment%3B%20filename%3Dwgcf_2.2.12_linux_arm64&response-content-type=application%2Foctet-stream [following]
--2022-03-20 21:20:08--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/255437195/815dfc39-fc55-48ca-95fe-3fc1f6ddc1ce?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220320%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220320T132008Z&X-Amz-Expires=300&X-Amz-Signature=ef365b16fcd219f0431a59c71c9e53afa6d716ca31be31a4f8ff62fb86a0b6cc&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=255437195&response-content-disposition=attachment%3B%20filename%3Dwgcf_2.2.12_linux_arm64&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8126464 (7.8M) [application/octet-stream]
Saving to: ‘/usr/local/bin/wgcf’

/usr/local/bin/wgcf          100%[==============================================>]   7.75M  --.-KB/s    in 0.09s   

2022-03-20 21:20:09 (82.9 MB/s) - ‘/usr/local/bin/wgcf’ saved [8126464/8126464]

 
 Docker build and run 
 
Unable to find image 'fscarmen/netflix_unlock:latest' locally
latest: Pulling from fscarmen/netflix_unlock
9b3977197b4f: Already exists 
79e42d81166e: Pull complete 
ab5d97e00598: Pull complete 
Digest: sha256:645d38b0cc7a088136ae99f58bfea3a73a0f06e7812940cb3ecc79e825859ca7
Status: Downloaded newer image for fscarmen/netflix_unlock:latest
37f21f69a9de9232a0b6f3234d1f6b2cad32bcfd6a923e58a392b1dd5cd96c67
 
 Done! The script runs on today: 5. Total: 9012 
 
root@phoenix4:~# docker exec -it wgcf curl -s4 https://ip.gs/json
{"ip":"8.45.47.32","ip_decimal":137178912,"country":"United States","country_iso":"US","country_eu":false,"region_name":"Arizona","region_code":"AZ","metro_code":753,"zip_code":"85383","city":"Peoria","latitude":33.7147,"longitude":-112.2401,"time_zone":"America/Phoenix","asn":"AS13335","asn_org":"CLOUDFLARENET","user_agent":{"product":"curl","version":"7.80.0","raw_value":"curl/7.80.0"}}

root@phoenix4:~# case $(docker exec -it wgcf curl -4 --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36" -fsL --write-out %{http_code} --output /dev/null --max-time 10 "https://www.netflix.com/title/81215567") in 404 ) echo '404 no';; 403 ) echo '403 No';; 200 ) echo '200 Yes';; 000 ) echo '000 Disconnect';; esac
200 Yes

root@phoenix4:~# docker exec -it wgcf ss -nltp
State  Recv-Q Send-Q Local Address:Port  Peer Address:PortProcess
LISTEN 0      4096               *:40000            *:*    users:(("gost",pid=91,fd=6))

root@phoenix4:~# docker logs -f wgcf
[#] ip link add wgcf type wireguard
[#] wg setconf wgcf /dev/fd/63
[#] ip -4 address add 172.16.0.2/32 dev wgcf
[#] ip -6 address add fd01:5ca1:ab1e:8f44:faeb:8686:547e:2e47/128 dev wgcf
[#] ip link set mtu 1280 up dev wgcf
[#] resolvconf -a wgcf -m 0 -x
[#] wg set wgcf fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wgcf table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n
crond[90]: crond (busybox 1.34.1) started, log level 8
2022/03/20 21:20:15 route.go:650: auto://:40000 on [::]:40000
^C 

root@phoenix4:~# docker exec -it wgcf ps -T
PID   USER     TIME  COMMAND
    1 root      0:00 {busybox} ash ./run.sh
   90 root      0:00 crond
   91 root      0:00 ./gost -L :40000
   92 root      0:00 ./gost -L :40000
   93 root      0:00 ./gost -L :40000
   94 root      0:00 ./gost -L :40000
   95 root      0:00 ./gost -L :40000
   96 root      0:00 ./gost -L :40000
  119 root      0:00 ps -T

root@phoenix4:~# arch
aarch64

from warp_unlock.

ziyocc avatar ziyocc commented on July 22, 2024

那个文件有的,重新安装了还是一样,很奇怪

root@debian:~# bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/warp_unlock/main/docker.sh)
 The current region is SG. Confirm press [y] . If you want another regions, please enter the two-digit region abbreviation. (such as hk,sg. Default is SG):
 Please enter Bot Token if you need push the logs to Telegram. Leave blank to skip:

 Install WGCF

--2022-03-21 06:13:44--  https://github.com/ViRb3/wgcf/releases/download/v2.2.12/wgcf_2.2.12_linux_arm64
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/255437195/815dfc39-fc55-48ca-95fe-3fc1f6ddc1ce?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220321T101345Z&X-Amz-Expires=300&X-Amz-Signature=a044e8d5b38b98833d5139f3963767f9e2a928587890d69b8ee89dd1dc97bef3&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=255437195&response-content-disposition=attachment%3B%20filename%3Dwgcf_2.2.12_linux_arm64&response-content-type=application%2Foctet-stream [following]
--2022-03-21 06:13:45--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/255437195/815dfc39-fc55-48ca-95fe-3fc1f6ddc1ce?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220321T101345Z&X-Amz-Expires=300&X-Amz-Signature=a044e8d5b38b98833d5139f3963767f9e2a928587890d69b8ee89dd1dc97bef3&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=255437195&response-content-disposition=attachment%3B%20filename%3Dwgcf_2.2.12_linux_arm64&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8126464 (7.8M) [application/octet-stream]
Saving to: ‘/usr/local/bin/wgcf’

/usr/local/bin/wgcf                                         100%[========================================================================================================================================>]   7.75M  --.-KB/s    in 0.06s

2022-03-21 06:13:45 (134 MB/s) - ‘/usr/local/bin/wgcf’ saved [8126464/8126464]


 Docker build and run

9345a5e648ba9a48fbea77a54f6b40019ccd980d55bc6050fd33b1a8061c2167

 Done! The script runs on today: 2. Total: 9017

root@debian:~# docker logs -f wgcf
[#] ip link add wgcf type wireguard
RTNETLINK answers: Not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wgcf
Cannot find device "wgcf"
crond[19]: crond (busybox 1.34.1) started, log level 8
2022/03/21 18:13:50 route.go:650: auto://:40000 on [::]:40000

from warp_unlock.

fscarmen avatar fscarmen commented on July 22, 2024

那个文件有的,重新安装了还是一样,很奇怪

方便加我个tg @fscarmen2 ,把ssh发我进去判断一下

from warp_unlock.

ziyocc avatar ziyocc commented on July 22, 2024

感谢大佬,自己白痴了,系统太旧了。。。

from warp_unlock.

fscarmen avatar fscarmen commented on July 22, 2024

经检查,系统是 DD 后的 debian ,内核版本是 4.19 ,很旧没有 wireguard 模块,处理方法两个

1.升级宿主机 Linux 内核到 5.6或以上

2.容器添加 wireguard-go,注意要用 arm64 版本,项目 release 里我已经交叉编译好各个CPU架构用的 wireguard-go了

以下是我用第两个方案处理

Linux debian 4.19.0-18-arm64 #1 SMP Debian 4.19.208-1 (2021-09-29) aarch64


oot@debian:~# docker exec -it wgcf bash

bash-5.1# wget https://github.com/fscarmen/warp/releases/download/wireguard-go/wireguard-go_linux_arm.tar.gz
Connecting to github.com (20.205.243.166:443)
Connecting to objects.githubusercontent.com (185.199.109.133:443)
saving to 'wireguard-go_linux_arm.tar.gz'
wireguard-go_linux_a 100% |********************************************************************|  995k  0:00:00 ETA
'wireguard-go_linux_arm.tar.gz' saved

bash-5.1# tar zxf wireguard-go_linux_arm.tar.gz -C /usr/bin

bash-5.1# chmod +x /usr/bin/wireguard-go

bash-5.1# wg-quick up wgcf
[#] ip link add wgcf type wireguard
RTNETLINK answers: Not supported
[!] Missing WireGuard kernel module. Falling back to slow userspace implementation.
[#] wireguard-go wgcf
┌──────────────────────────────────────────────────────┐
│                                                      │
│   Running wireguard-go is not required because this  │
│   kernel has first class support for WireGuard. For  │
│   information on installing the kernel module,       │
│   please visit:                                      │
│         https://www.wireguard.com/install/           │
│                                                      │
└──────────────────────────────────────────────────────┘
[#] wg setconf wgcf /dev/fd/63
[#] ip -4 address add 172.16.0.2/32 dev wgcf
[#] ip -6 address add fd01:5ca1:ab1e:87b9:c046:54a7:439e:cafa/128 dev wgcf
[#] ip link set mtu 1280 up dev wgcf
[#] resolvconf -a wgcf -m 0 -x
[#] wg set wgcf fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wgcf table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n

bash-5.1# curl -s4 https://ip.gs/json
{"ip":"8.38.147.11","ip_decimal":136745739,"country":"Singapore","country_iso":"SG","country_eu":false,"zip_code":"18","city":"Singapore","latitude":1.2929,"longitude":103.8547,"time_zone":"Asia/Singapore","asn":"AS13335","asn_org":"CLOUDFLARENET","user_agent":{"product":"curl","version":"7.80.0","raw_value":"curl/7.80.0"}}

from warp_unlock.

Related Issues (20)

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.