Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: V6.25 中,启动 tun 模式后,config.json 中缺少 http 和 socks 端口监听的配置 #3915

Closed
2 tasks done
yang05051 opened this issue May 28, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@yang05051
Copy link

yang05051 commented May 28, 2023

预期情况

启动 tun 模式后,config.json 文件中的 inbound 下应有 tun 的配置以及 http 和 socks 端口监听的配置

实际情况

启动 tun 模式后,config.json 文件中的 inbound 下缺少 http 和 socks 端口监听的配置,只有 tun 的配置

复现方法

开启 tun 模式,观察 config.json 文件

日志信息

额外信息

软件版本 V6.25

我确认已更新至最新版本

我确认已查询历史issues

@yang05051 yang05051 added the bug Something isn't working label May 28, 2023
@chika0801
Copy link
Contributor

tun模式就是全局接管流量,在入站模块中,就写一组tun的就行了。

你有兴趣研究可参考 https://github.com/chika0801/sing-box-examples/tree/main/Tun

@yang05051
Copy link
Author

yang05051 commented May 30, 2023

tun模式就是全局接管流量,在入站模块中,就写一组tun的就行了。

你有兴趣研究可参考 https://github.com/chika0801/sing-box-examples/tree/main/Tun

这个我明白,我提这个issue的意思是,开启tun模式之后,入站模块中只有tun的组,没有其他端口监听的组,希望能够加上去。如果缺少监听端口的组,那么“允许来自LAN的连接”这个功能就失效了,因为内核根本没有监听任何端口。

@2dust
Copy link
Owner

2dust commented Jun 4, 2023

暂时没有加入计划加入
请问您有什么必须开tun模式,而后有必须有其他两个inboud的场景

@2dust 2dust closed this as completed Jun 4, 2023
@yang05051
Copy link
Author

yang05051 commented Jun 4, 2023

暂时没有加入计划加入
请问您有什么必须开tun模式,而后有必须有其他两个inboud的场景

我经常运行虚拟机,并想让虚拟机的所有流量走代理,因此需要tun模式。

并且我还需要开启 "允许来自LAN的连接" 这个功能,因此端口监听很重要。如果不监听端口,"允许来自LAN的连接" 这个选项就形同虚设。

老版本中,singbox仅作为tun的前置、xray(或其他内核)作为后端内核时,开启tun模式后也能正常监听端口;新版本反而不行了,这个算不算功能的倒退呢?

希望2dust能够再考虑一下哈,而且实现这个也不算太难,就是在singbox的配置里面多加几个inbound,这么做没有任何缺点。

@2dust
Copy link
Owner

2dust commented Jun 4, 2023

v2rayN.zip

下载此版本,先运行一次,关闭
然后打开guiNconfig.json 文件,找到 enableExInbound,改成true
保存后重启
此时会产生额外的socks 入口

@yang05051
Copy link
Author

v2rayN.zip

下载此版本,先运行一次,关闭
然后打开guiNconfig.json 文件,找到 enableExInbound,改成true
保存后重启
此时会产生额外的socks 入口

辛苦了大佬,后续遇到问题会及时给您反馈的

@Enborgrn
Copy link

Enborgrn commented Jun 8, 2023

v2rayN.zip

下载此版本,先运行一次,关闭 然后打开guiNconfig.json 文件,找到 enableExInbound,改成true 保存后重启 此时会产生额外的socks 入口
大佬,为什么我使用你说的修改了js文件,但是就是不能启用tunnel模式啊,启用就会直接的变成图中(见图二)的模样。我用的xray内核的gvisor,就是不能启用tun模式。之前的21版本启用tun模式之后sing_box“无法访问网络”(见图一)“,但是还是能正常上网,我就没管了。我还用clash的clash_tun也是这个样子。
image

image

@Fhokud
Copy link

Fhokud commented Jun 13, 2023

可不可以在TUN模式设置里做一个启用这个功能的按钮。@2dust

测试enableExInbound改成true后可以正常使用socks

@2dust
Copy link
Owner

2dust commented Jun 18, 2023

可不可以在TUN模式设置里做一个启用这个功能的按钮。@2dust

测试enableExInbound改成true后可以正常使用socks

暂时不开放此功能

@315923876
Copy link

同,版本最新6.27,开启tun模式后就不监听socks和http端口了,老版本6.23还是有用的。之前这个功能还有用的,希望以后能够回滚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants