本帖最後由 张无忌 於 2025-9-9 13:18 編輯

Xray in HK MikroTik container

Besides V2Ray[1], another package Xray[2] can be installed in MikroTik container. Please refer to V2Ray for setting up the container.

HK MikroTik hAP ac3  + USB container (V2Ray / Xray) <---> mainland China (PassWall / V2RayN)

HK MikroTik container
  1. /container add remote-image=teddysun/xray:latest interface=veth1 root-dir=disk1/xray

  2. /container print
  3. 0 ... status=extracting

  4. /container print
  5. 0 ... status=stopped
複製代碼
Starting and stopping image
  1. #start the image
  2. /container start 0

  3. #stop the image
  4. /container stop 0
複製代碼
If the shell "0" enters using "/container start 0", you can see the default "cat /etc/xray/config" below
  1. {
  2.   "inbounds": [{
  3.     "port": 9000,
  4.     "protocol": "vmess",
  5.     "settings": {
  6.       "clients": [
  7.         {
  8.           "id": "1eb6e917-774b-4a84-aff6-b058577c60a5"
  9.         }
  10.       ]
  11.     }
  12.   }],
  13.   "outbounds": [{
  14.     "protocol": "freedom",
  15.     "settings": {}
  16.   }]
  17. }
複製代碼
Input packets from ether1 tcp-port=38866 converting 172.16.77.2 to-ports=9000
  1. /ip/firewall/nat add chain=dstnat action=dst-nat protocol=tcp to-address=172.16.77.2 to-ports=9000 in-interface=ether1 dst-port=38866
複製代碼
Container image start
  1. /container start 0
複製代碼
Mainland China client
A Windows V2RayN was used and followed "config.json" to adjust the settings.
  1. 别名(remarks)=veth1
  2. 地址(address)=abc.xyz.org
  3. 端口(port)=38866
  4. 用户 ID(id)=1eb6e917-774b-4a84-aff6-b058577c60a5
複製代碼
PassWall on OpenWrt
  1. Node Remarks=veth1
  2. Type=Sing-Box
  3. Protocol=Vmess
  4. Address (Support Domain Name)=abc.xyz.org
  5. Port=38866
  6. ID=1eb6e917-774b-4a84-aff6-b058577c60a5
複製代碼
现在又有Xray,那么我可以用V2Ray和Xray进行不同的configurations。

Refereces:
[1] teddysun/v2ray
[2] teddysun/xray

目录帖子GL.iNet and OpenWrt Contents

TOP

回覆  黑馬過林


   我在内地,你要干嘛???
linuxfans 發表於 2025-5-31 14:36



    要

TOP

本帖最後由 张无忌 於 2025-9-9 13:15 編輯

ImmortalWrt OpenClash重新快速安装

用System->Software, Update lists
Filter=openclash, 看到luci-app-openclash, install

Services->OpenClash
Plugin Settings->Version Update

[Meta] Current Core=File Not Exist ===> [Meta] Latest Core=alpha-g34de62d <New>
  1. wget [url]https://raw.githubusercontent.com/vernesong/OpenClash/core/master/meta/clash-linux-arm64.tar.gz[/url]
  2. tar -xvzf clash-linux-arm64.tar.gz
  3. mv clash /etc/openclash/core/clash_meta
複製代碼
Current Client=v0.46.079 ===> Latest Client=v0.46.086 <New>
  1. wget [url]https://github.com/vernesong/OpenClash/releases/download/v0.46.086/luci-app-openclash_0.46.086_all.ipk[/url] -O openclash.ipk
  2. opkg install openclash.ipk
  3. reboot
複製代碼
把OpenClash安装好,可以安装机场后,能看到YouTube and CCTV5。

目录帖子GL.iNet and OpenWrt Contents

TOP

本帖最後由 张无忌 於 2025-9-9 13:18 編輯

teddysun/xray里VMess-TCP

上一次"teddysun/xray"[1]的default config.json[2],现在我们看Xray-examples[3]。

HK MikroTik hAP ac3  + USB container (V2Ray / Xray) <---> mainland China (PassWall / V2RayN)

1. Default config.json
2. Xray-examples -> VMess-TCP -> config_server.jsonc[4]

VMess-TCP -> config_server.jsonc
  1. {
  2.     "log": {
  3.         "loglevel": "warning"
  4.     },
  5.     "routing": {
  6.         "domainStrategy": "AsIs",
  7.         "rules": [
  8.             {
  9.                 "type": "field",
  10.                 "ip": [
  11.                     "geoip:private"
  12.                 ],
  13.                 "outboundTag": "block"
  14.             }
  15.         ]
  16.     },
  17.     "inbounds": [
  18.         {
  19.             "listen": "0.0.0.0",
  20.             "port": 1234,
  21.             "protocol": "vmess",
  22.             "settings": {
  23.                 "clients": [
  24.                     {
  25.                         "id": ""
  26.                     }
  27.                 ]
  28.             },
  29.             "streamSettings": {
  30.                 "network": "tcp"
  31.             }
  32.         }
  33.     ],
  34.     "outbounds": [
  35.         {
  36.             "protocol": "freedom",
  37.             "tag": "direct"
  38.         },
  39.         {
  40.             "protocol": "blackhole",
  41.             "tag": "block"
  42.         }
  43.     ]
  44. }
複製代碼
上面只是example,我们需要更改。我们利用"Download raw file" to Windows,用note app是"Unix (LF) UTF-8" format。

"port": 1234,   ===> "port": 9000,
"id": "" ===> "id": "1eb6e917-774b-4a84-aff6-b058577c60a5"

这两个需要更改的,save "config.json"。在container Xray的shell "vi /etc/xray/config.json", 把原先config.json现在只能cut-and-copy方法。

测试用Windows V2RayN and OpenWrt PassWall,都测试过成功。

说明其他方法可以用,随意和default  config.json效果一样,但是现在与新的不一样,说明其他examples都可以,那么我们可以再进一步探索。

References:
[1] teddysun/xray
[2] Xray in HK MikroTik container
[3] Xray-examples
[4] Xray-examples/VMess-TCP/config_server.jsonc

目录帖子GL.iNet and OpenWrt Contents

TOP

本帖最後由 张无忌 於 2026-1-31 00:49 編輯

除了GL-MT6000,其他CN | US改动可以利用"悟空"切一键换解锁

如果GL-MT6000改动US,可以参考[1],其他GL-MT5000,GL-MT3600BE,GL-MT3000,GL-BE6500,GL-BE3600,GL-AXT1800,GL-MT2500,可以参考[2]。在大陆和香港都可以用到US码,那么选用"繁体"就可以有VPN功能,例如Wireguard和OpenVPN。

GL-AXT1800
  1. echo -n "US" | dd of=/dev/mtdblock8 bs=1 seek=152 conv=notrunc
  2. sync
  3. reboot
複製代碼
GL-MT3000
  1. echo -n "US" | dd of=/dev/mtdblock3 bs=1 seek=136 conv=notrunc
  2. sync
  3. reboot
複製代碼
GL-MT6000
  1. echo -n "US" | dd of=/dev/mmcblk0p2 bs=1 seek=136 conv=notrunc
  2. sync
  3. reboot
複製代碼
GL-MT2500
  1. echo -n "US" | dd of=/dev/mmcblk0boot1 bs=1 seek=136 conv=notrunc
  2. sync
  3. reboot
複製代碼
GL-BE3600, GL-BE6500
  1. echo -n "US" | dd of=/dev/mtdblock11 bs=1 seek=136 conv=notrunc
  2. sync
  3. reboot
複製代碼
GL-MT3600BE
  1. echo -n "US" | dd of=/dev/mtdblock3 bs=1 seek=16520 conv=notrunc
  2. sync
  3. reboot
複製代碼
GL-MT5000
Ckeck CN/US
  1. hexdump -C -s 0x4080 -n 32 /dev/mmcblk0p2
複製代碼
Change to CN
  1. echo -n "US" | dd of=/dev/mmcblk0p2 bs=1 seek=16520 conv=notrunc
  2. sync
  3. reboot
複製代碼
..

因为[2]突然看不到,原因不知道,我把重要CN->US都记录下来;而在[1]我把重要的CN->US也登出来,好让大家参考。

References:
[1] 大陆版CN转到美国版US程序
[2] GL-iNet MT3000 如何切换区域 US|CN|切一键换 解锁更多功能 AdguardHome Wireguard OpenVPN Surfshark VPN

目录帖子GL.iNet and OpenWrt Contents

TOP

除了GL-MT6000,其他CN | US改动可以利用"悟空"切一键换解锁

张无忌 發表於 2025-6-8 05:39


這個 post 的內容不錯,  建議你可另外獨立出貼分享改區心得。

1.  之前在 Github 也留意到這個 project page 談到類似改區內容 (但就未包 GL-BE3600)
https://github.com/Zayrick/GL-iNet-GeoChanger

2.  建議改區前, 可先用 dd 來 backup 該 partition 成為檔案,  利用 scp / WinSCP 抄到電腦備份留底。做法可參考另一位師兄之前的提議

TOP

本帖最後由 张无忌 於 2025-6-10 08:35 編輯

谢谢你的鼓励,暂时都放在统一帖子里,方便处理。

帖子主要把重要CN->US说出来,至于事前已经说明,不用再重复[1]。

Reference:
[1] 大陆版CN转到美国版US程序

TOP

本帖最後由 张无忌 於 2025-8-16 23:40 編輯

香港与大陆使用GL-MT6000进度(一)

大陆使用GL-MT6000:
1. GL-MT6000买回来,直接刷原厂OpenWrt。
2. 大陆与外国用网络"分流"。
3. 可以安装PassWall,OpenClash,再租用机场,主要用Sing-Box和Xray。
4. 个别节点PassWall接入香港加入家用的WireGuard server。
5. 香港家里的MikroTik可以设WireGuard server,或者加USB container,加Sing-Box和Xray servers(非port 80,非TLS协议)。
6. 如果是香港商业用server,ISP就可以port 80给router,那么可以用Sing-Box和Xray servers,可以有TLS协议。
7. 例如美国或日本商业VPS,可以Debian/Ubuntu server,安装很多东西,例如Vless+WS+TLS,还可以加Cloudflare CDN和DNS Hosting,在大陆可以用PassWall或Windows V2RayN。

香港使用GL-MT6000:
1. GL-MT6000从大陆买回来,需要把CN->US,VPN要打开GL.iNet Admin Panel选English或繁体;直接刷原厂OpenWrt,不需要把CN->US。
2. 连接大陆需要有大陆IP server,用亲友的public IP,就可以安装WireGuard server;没有的就用public VPS,如阿里云,微信云。
3. 连非大陆,用很多世界各地都有WireGuard servers。
4. 因为用香港IP,不能看ChatGPT,需要美国,日本或其他VPS。

大陆和香港可以租用美国,日本其他国家的VPS。

目录帖子GL.iNet and OpenWrt Contents

TOP

本帖最後由 张无忌 於 2025-9-9 13:19 編輯

Virtual Private Servers (VPS) 选择(一)

因为香港家里的router受到ISP port 80限制,就算用MikroTik + container,container安装V2Ray或Xray,它牵涉port 80就block,所以它不能加TLS,于是寻找其他方法,通过ChatGPT提供VPS:

Vultr https://www.vultr.com/
DigitalOcean https://www.digitalocean.com/
Linode https://www.linode.com/

我选择美国的Vultr,它能提供VPS服务,有很多国家,收费按时收费,我选择机器0.007美金/小时,一个月约5美元,如果把服务取消就停止收费,不过对大陆来说,选择美国 Los Angeles比较好,因为ping time只有160ms。

目录帖子GL.iNet and OpenWrt Contents

TOP

本帖最後由 张无忌 於 2025-9-9 13:19 編輯

Vultr VPS 注册,加钱及选机型

1. https://www.vultr.com/,注册

Figure 1: Vulra VPS


2. 需要在account加钱,Click "Account"->"Make a Payment"->(Next  screen) "Alipay","Make an Alipay Payment",我在大陆选用"Alipay",可以选"$10",click "Pay with Alipay",
3. 选用机型"Products"->"Deploy Server",
4. "Shared CPU"->"Los Angeles"->"vc2-1c-1gb" $5.00/mo ($0.007/hr),
5. "Automatic Backups" Enabled($1.00 /mo), select "Disable",
6. "Disable Automatic Backups?"->"Yes, I understand the risks" tick the box, click "Disable Automatic Backups","Total Price" becomes from "$6.00/mo ($0.008/hr)" to "$5.00/mo ($0.007/hr)",
7. "Configure Software",
8. "Debian"->"Select Version", select "12 x64",
9. Click "Deploy"。
10. Cloud Computer,Status "Installing" change "Running" ,click "->" under Status

Figure 2:  Server Information


经过上面,我们就可以有一台美国Linux server。还有认真试过从 ping time:
Silicon Valley IP=104.156.230.107
Los Angeles IP=108.61.219.200
Seattle  IP=108.61.194.105

大陆ping time它们仨:
Silicon Valley 139ms
Los Angeles 151ms
Seattle 161ms

香港ping time它们仨:
Silicon Valley 151ms
Los Angeles 152ms
Seattle 179ms

因为我在大陆,用我的Alipay不行,因为没有大陆身份证,所以用了大陆亲友的Alipay就可以,在香港用credit cards也可以。我选Los Angeles,后来发现Silicon Valley是最后的,可能下次选用Silicon Valley。

我在2025年6月9日注册,入了25美元,中间如果不用,就把server deleted,到现在2025年6月21日才用了0.31美元。


目录帖子GL.iNet and OpenWrt Contents
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP