v2rayN icon indicating copy to clipboard operation
v2rayN copied to clipboard

[Bug]: 新版本允许局域网连接,没办法正常代理

Open Byxs20 opened this issue 1 year ago • 8 comments

预期情况

只要开启设置-允许来自局域网的连接,然后使用wsl2设置一下全局代理即可给wsl2设置走本机的代理

实际情况

实际上并没有能成功代理上,甚至访问百度也不行了,但是在使用老版本v6.45.0就没有这个问题

复现方法

1.开始设置-允许局域网连接 2.在wsl2的ubuntu中设置代理

export hostip=$(cat /etc/resolv.conf | grep -oP '(?<=nameserver\ ).*')
export ALL_PROXY="socks5://${hostip}:10808";

日志信息

2024-11-29 14:05:23.8070-INFO v2rayN start up | v2rayN - V7.1.3 - X64 - 2024/11/18 | F:\CTF\ProgramFiles\科学上网\v2rayN-windows-64-SelfContained-With-Core\v2rayN.exe
2024-11-29 14:05:23.8166-INFO Microsoft Windows NT 10.0.22000.0 - 64
2024-11-29 14:05:24.5689-INFO UpdateTaskRunGeo
2024-11-29 14:06:02.8481-DEBUG The operation has timed out.,The operation has timed out.
2024-11-29 14:06:02.8481-DEBUG    at ServiceLib.Services.DownloadService.DownloadStringAsync(String url, Boolean blProxy, String userAgent, Int32 timeout)
2024-11-29 14:06:11.8170-DEBUG TaskScheduler_UnobservedTaskException,A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Object reference not set to an instance of an object.)
2024-11-29 14:06:11.8170-DEBUG 
2024-11-29 14:06:11.8170-ERROR System.NullReferenceException: Object reference not set to an instance of an object.
2024-11-29 14:06:11.8170-DEBUG TaskScheduler_UnobservedTaskException,A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Object reference not set to an instance of an object.)
2024-11-29 14:06:11.8170-DEBUG 
2024-11-29 14:06:11.8170-ERROR System.NullReferenceException: Object reference not set to an instance of an object.
2024-11-29 14:06:17.8820-DEBUG The operation has timed out.,The operation has timed out.
2024-11-29 14:06:17.8820-DEBUG    at ServiceLib.Common.DownloaderHelper.DownloadStringAsync(IWebProxy webProxy, String url, String userAgent, Int32 timeout)
   at ServiceLib.Common.DownloaderHelper.DownloadStringAsync(IWebProxy webProxy, String url, String userAgent, Int32 timeout)
   at ServiceLib.Services.DownloadService.DownloadStringViaDownloader(String url, Boolean blProxy, String userAgent, Int32 timeout)
2024-11-29 14:06:22.1770-DEBUG ,
2024-11-29 14:06:22.1770-DEBUG    at ServiceLib.Handler.CoreHandler.RunProcess(CoreInfo coreInfo, String configPath, Boolean displayLog, Boolean mayNeedSudo)
2024-11-29 14:06:24.5738-INFO UpdateTaskRunSubscription
2024-11-29 14:06:28.4261-DEBUG The SSL connection could not be established, see inner exception.,The SSL connection could not be established, see inner exception.
2024-11-29 14:06:28.4261-DEBUG    at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   at ServiceLib.Common.HttpClientHelper.GetAsync(HttpClient client, String url, CancellationToken token)
   at ServiceLib.Services.DownloadService.DownloadStringAsync(String url, Boolean blProxy, String userAgent, Int32 timeout)
2024-11-29 14:06:28.4261-ERROR System.IO.IOException: Unable to read data from the transport connection: 远程主机强迫关闭了一个现有的连接。.
2024-11-29 14:06:31.8729-DEBUG TaskScheduler_UnobservedTaskException,A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The operation has timed out.)
2024-11-29 14:06:31.8734-DEBUG 
2024-11-29 14:06:31.8734-ERROR System.Net.WebException: The operation has timed out.
2024-11-29 14:06:31.8734-DEBUG TaskScheduler_UnobservedTaskException,A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The SSL connection could not be established, see inner exception.)
2024-11-29 14:06:31.8734-DEBUG 
2024-11-29 14:06:31.8734-ERROR System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
2024-11-29 14:06:31.8906-INFO subscription更新订阅结束
2024-11-29 14:07:49.7592-INFO MyAppExit Begin
2024-11-29 14:07:50.7881-INFO MyAppExit End
2024-11-29 14:07:50.7881-INFO OnExit
2024-11-29 14:08:08.7624-INFO v2rayN start up | v2rayN - V7.1.3 - X64 - 2024/11/18 | F:\CTF\ProgramFiles\科学上网\v2rayN-windows-64-SelfContained-With-Core\v2rayN.exe
2024-11-29 14:08:08.7709-INFO Microsoft Windows NT 10.0.22000.0 - 64
2024-11-29 14:08:09.2324-INFO UpdateTaskRunGeo
2024-11-29 14:09:09.2389-INFO UpdateTaskRunSubscription

额外信息

No response

我确认已更新至最新版本

  • [X] 是

我确认已查询历史issues

  • [X] 是

Byxs20 avatar Nov 29 '24 06:11 Byxs20

你给出的日志是本app运行的日志,请给下core的日志,你开debug在主界面会显示 开启允许局域网后,你可以查看下config.json文件中的inboud中是否有正确的配置?

2dust avatar Nov 29 '24 09:11 2dust

guiConfigs/config.json 内容如下:

{
	"inbounds": [{
			"tag": "socks",
			"port": 10808,
			"listen": "0.0.0.0",
			"protocol": "socks",
			"sniffing": {
				"enabled": true,
				"destOverride": [
					"http",
					"tls"
				],
				"routeOnly": false
			},
			"settings": {
				"auth": "noauth",
				"udp": true,
				"allowTransparent": false
			}
		},
		{
			"tag": "http",
			"port": 10809,
			"listen": "0.0.0.0",
			"protocol": "http",
			"sniffing": {
				"enabled": true,
				"destOverride": [
					"http",
					"tls"
				],
				"routeOnly": false
			},
			"settings": {
				"auth": "noauth",
				"udp": true,
				"allowTransparent": false
			}
		}
	]
}

我不太清楚哪个字段是代表允许局域网连接的,Core日志方便说一下具体目录位置么?

Byxs20 avatar Nov 29 '24 09:11 Byxs20

"listen": "0.0.0.0", 这个代表非本机了,配置文件已经正确,剩下的问题需要你自己查了

2dust avatar Nov 29 '24 10:11 2dust

但是我另一个朋友也是一样用不了,所以我才来发issue,那我暂时先用老版本吧

Byxs20 avatar Nov 29 '24 10:11 Byxs20

你把core换下,比如切换成sing-box的,看是否能用 还有可以换一个老版本的xray-core

2dust avatar Nov 29 '24 10:11 2dust

我使用你说的 sing-box 也不太行 给老版本能正常代理的 bin\xray\xray.exe 替换过去了,也是不太行,很奇怪。。

Byxs20 avatar Nov 29 '24 10:11 Byxs20

已经没有办法帮你了,本app只能保证打开了正确的端口,你的app能否使用就得你自己来解决了

2dust avatar Dec 02 '24 06:12 2dust

测试v7.23+最新core,用局域网代理给mumu模拟器玩国际服游戏能正常连接

plasmatank avatar Dec 03 '24 22:12 plasmatank

我更新系统后好了,太奇怪了

Byxs20 avatar Dec 05 '24 12:12 Byxs20