找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2547|回复: 8

[N1盒子] N1盒子上实现 Openwrt 的免费内网穿透

[复制链接]
发表于 2022-4-22 14:14 | 显示全部楼层 |阅读模式
写在前面:本教程针对没有公网IP或没有映射权限的用户。比如移动宽带或者多级路由没有主路由权限无法做映射的。
原文地址:直达
教程开始前的准备工作:
  • 确定需要内网穿透服务的内网IP地址及端口,如青龙面板 192.168.1.2:5700
  • ssh登录openwrt的 IP 用户名 密码


教程开始
1.先注册账号并登录
用户注册后送一条1M的线路(流量每月1G)

2.配置隧道

2.2 复制令牌

3. N1盒子安装网云穿
ssh登录之后,下载网云穿

curl -O http://xiaomy.net/download/linux/wyc_linux_arm
给777权限

chmod -R 777 ./wyc_linux_arm
测试启动网云穿

./wyc_linux_arm -token=令牌号码
见到 “登录成功,现在您可访问 xxxx.xiaomy.net:12345,将直接映射到您本地的192.168.xx.xx:80·“表示已经穿透成功,可以通过提示的域名进入。
4.给网云穿设置开机自启
修改文件/etc/init.d/cron

cp -a /root/crontabs/root /etc/crontabs
mkdir -p /var/spool/cron <-这行之上加上上述的,然后保存
修改文件/usr/lib/lua/luci/model/cbi/admin_system/crontab.lua
在  local cronfile = "/etc/crontabs/root"的下边增加一行

local cronfile1 = "/root/crontabs/root"
然后在 fs.writefile(cronfile, data.crons:gsub("\r\n", "\n")) 下边增加一行

fs.writefile(cronfile1, data.crons:gsub("\r\n", "\n"))
最后保存。
在/root/crontabs/ 下新建 root
编辑文件 /root/crontabs/root
* 30 * * * /root/wyc_linux_arm -token=令牌号码 >./wycout.txt 2>&1 &

保存后重启,cron计划任务会在每小时的30分钟启动一次网云穿,可以看/root/wycout.txt de 查看运行状态。

网云穿启动之后,访问你网云穿隧道管理里边的域名,即可在外网访问你内网穿透的服务。




评分

参与人数 1恩山币 +1 收起 理由
yangzong55 + 1 感谢你的分享,无论怎样,你都是最无私的人.

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
发表于 2022-4-22 16:38 | 显示全部楼层
你好,x86怎样使用
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-4-23 11:47 | 显示全部楼层
root@OpenWrt:~# curl -O http://xiaomy.net/download/linux/wyc_linux_arm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   146  100   146    0     0    599      0 --:--:-- --:--:-- --:--:--   629
root@OpenWrt:~# chmod -R 777 ./wyc_linux_arm
root@OpenWrt:~# ./wyc_linux_arm -token=wqew3y3m
./wyc_linux_arm: line 1: html: No such file or directory
./wyc_linux_arm: line 2: syntax error near unexpected token `<'
'/wyc_linux_arm: line 2: `<head><title>404 Not Found</title></head>
root@OpenWrt:~#

点评

你好,我写完教程后,官方改了下载地址  详情 回复 发表于 2022-4-28 17:52
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-4-28 17:52 | 显示全部楼层
oi02lsl 发表于 2022-4-23 11:47
root@OpenWrt:~# curl -O http://xiaomy.net/download/linux/wyc_linux_arm
  % Total    % Received % Xf ...

你好,我写完教程后,官方改了下载地址,在执行一下就好了
curl -O http://down.xiaomy.net/download/linux/wyc_linux_arm

点评

测试启动网云穿 ./wyc_linux_arm -token=令牌号码 root@OpenWrt:~# ./wyc_linux_arm -token=uhodycl1 ./wyc_linux_arm: line 1: syntax error near unexpected token `newline' ./wyc_linux_arm: line 1: `'  详情 回复 发表于 2022-4-29 00:31
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-4-29 00:31 | 显示全部楼层
路桥 发表于 2022-4-28 17:52
你好,我写完教程后,官方改了下载地址,在执行一下就好了
curl -O http://down.xiaomy.net/download/lin ...

测试启动网云穿
./wyc_linux_arm -token=令牌号码

root@OpenWrt:~# ./wyc_linux_arm -token=uhodycl1
./wyc_linux_arm: line 1: syntax error near unexpected token `newline'
./wyc_linux_arm: line 1: `<?xml version="1.0" encoding="UTF-8"?>'

点评

重新执行curl那条命令  详情 回复 发表于 2022-5-4 10:57
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-5-4 10:57 | 显示全部楼层
oi02lsl 发表于 2022-4-29 00:31
测试启动网云穿
./wyc_linux_arm -token=令牌号码

重新执行curl那条命令
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-5-22 21:49 | 显示全部楼层
厉害厉害,学会了,就更新下下载地址就行了,感谢感谢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-5-23 22:16 | 显示全部楼层
楼主你好,自动启动设置没搞明白,能出个详细教程吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-5 18:44 | 显示全部楼层
大佬请教一下,

检测更新中:
Error[2022-06-05 18:43:12]:HTTP请求出错,错误信息为:Get "http://update.xiaomy.                                             net/go_linux/version.txt": dial tcp: lookup update.xiaomy.net on [::1]:53: read                                              udp [::1]:43964->[::1]:53: read: connection refused
Error[2022-06-05 18:43:12]:func name: runtime.gopanic

Error[2022-06-05 18:43:12]:file: /usr/local/go/src/runtime/panic.go, line: 969


Error[2022-06-05 18:43:12]:panic recover! err:%!(EXTRA runtime.errorString=runt                                             ime error: invalid memory address or nil pointer dereference)
Error[2022-06-05 18:43:12]:func name: runtime.panicmem

Error[2022-06-05 18:43:12]:file: /usr/local/go/src/runtime/panic.go, line: 212


Error[2022-06-05 18:43:12]:panic recover! err:%!(EXTRA runtime.errorString=runt                                             ime error: invalid memory address or nil pointer dereference)
Error[2022-06-05 18:43:12]:func name: runtime.sigpanic

Error[2022-06-05 18:43:12]:file: /usr/local/go/src/runtime/signal_unix.go, line                                             : 720


Error[2022-06-05 18:43:12]:panic recover! err:%!(EXTRA runtime.errorString=runt                                             ime error: invalid memory address or nil pointer dereference)
Error[2022-06-05 18:43:12]:func name: wyc_client/utility.HTTPGet1

Error[2022-06-05 18:43:12]:file: /Users/shishuaibiao/Documents/GolangProjects/g                                             o_client/utility/HttpClient.go, line: 48


Error[2022-06-05 18:43:12]:panic recover! err:%!(EXTRA runtime.errorString=runt                                             ime error: invalid memory address or nil pointer dereference)
Error[2022-06-05 18:43:12]:func name: main.loginByToken

Error[2022-06-05 18:43:12]:file: /Users/shishuaibiao/Documents/GolangProjects/g                                             o_client/main/main.go, line: 35


Error[2022-06-05 18:43:12]:panic recover! err:%!(EXTRA runtime.errorString=runt                                             ime error: invalid memory address or nil pointer dereference)
Error[2022-06-05 18:43:12]:发生了未知异常,请您上报日志文件并重新启动隧道

这个咋解决啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-24 11:25

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表