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

公网访问局域网的服务器出错 #37

Closed
w0330t opened this issue Nov 4, 2019 · 4 comments
Closed

公网访问局域网的服务器出错 #37

w0330t opened this issue Nov 4, 2019 · 4 comments

Comments

@w0330t
Copy link

w0330t commented Nov 4, 2019

公网访问群晖做的端口转发。
image

在重新启动路由器之后,通过公网IP访问内部网络服务器会出现无法连接的情况。

PS C:\Windows\system32> curl https://113.206.171.12:5001/
curl : 基础连接已经关闭: 发送时发生错误。
所在位置 行:1 字符: 1
+ curl https://113.206.171.12:5001/
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest],WebExce
    ption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

点击“重载服务”按钮后正常,关闭v2正常,关闭后再打开也恢复正常。

下面是日志,虽然只是info级别的……

2019/11/04 10:54:56 [Info] [3787175534] v2ray.com/core/app/dispatcher: taking detour [direct] for [tcp:113.206.171.12:5001]
2019/11/04 10:54:56 [Info] [2949025408] v2ray.com/core/app/dispatcher: taking detour [direct] for [tcp:113.206.171.12:5001]
2019/11/04 10:54:56 [Info] [3787175534] v2ray.com/core/proxy/freedom: opening connection to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [2949025408] v2ray.com/core/proxy/freedom: opening connection to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [2949025408] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [3787175534] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [3787175534] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [2949025408] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [2949025408] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [3787175534] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [3787175534] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [2949025408] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [2949025408] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:56 [Info] [3787175534] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:113.206.171.12:5001
2019/11/04 10:54:57 [Info] [3787175534] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: failed to open connection to tcp:113.206.171.12:5001 > v2ray.com/core/common/retry: [dial tcp 113.206.171.12:5001: connect: connection refused] > v2ray.com/core/common/retry: all retry attempts failed
2019/11/04 10:54:57 [Info] [3787175534] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe

配置如下:(vmess的具体配置已经删除)

{
	"log": {
		"loglevel": "info",
		"access": "\/var\/log\/v2ray-access.log",
		"error": "\/var\/log\/v2ray-error.log"
	},
	"dns": {
		"hosts": {
			"example.com": "127.0.0.1"
		},
		"servers": [
			"8.8.8.8",
			{
				"address": "208.67.222.222",
				"port": 5353
			},
			{
				"address": "114.114.114.114",
				"port": 53,
				"domains": [
					"geosite:cn"
				]
			}
		]
	},
	"routing": {
		"domainStrategy": "IPOnDemand",
		"rules": [
			{
				"type": "field",
				"domain": [
					"drives.amd.com"
				],
				"outboundTag": "proxy"
			},
			{
				"type": "field",
				"ip": [
					"geoip:private",
					"geoip:cn"
				],
				"outboundTag": "direct"
			},
			{
				"type": "field",
				"domain": [
					"geosite:cn"
				],
				"outboundTag": "direct"
			},
			{
				"type": "field",
				"domain": [
					"geosite:speedtest"
				],
				"outboundTag": "direct"
			},
			{
				"type": "field",
				"domain": [
					"geosite:category-ads-all"
				],
				"outboundTag": "block"
			},
			{
				"type": "field",
				"port": "53",
				"network": "udp",
				"inboundTag": [
					"transparent_proxy"
				],
				"outboundTag": "dns_out"
			}
		],
		"balancers": [
			{
				"tag": "proxy",
				"selector": [
					"sakura",
					"bwg"
				]
			}
		]
	},
	"inbounds": [
		{
			"listen": "0.0.0.0",
			"port": 1081,
			"protocol": "dokodemo-door",
			"tag": "transparent_proxy",
			"sniffing": {
				"enabled": true,
				"destOverride": [
					"http",
					"tls"
				]
			},
			"settings": {
				"network": "tcp",
				"timeout": 300,
				"followRedirect": true
			}
		}
	],
	"outbounds": [
		{
			"sendThrough": "0.0.0.0",
			"protocol": "vmess",
			"tag": "aaa",
			"mux": {
				"enabled": true,
				"concurrency": 8
			},
			"settings": {
				"vnext": [
				]
			},
			"streamSettings": {
			}
		},
		{
			"sendThrough": "0.0.0.0",
			"protocol": "vmess",
			"tag": "bbb",
			"mux": {
				"enabled": true,
				"concurrency": 8
			},
			"settings": {
				"vnext": [
				]
			},
			"streamSettings": {
			}
		},
		{
			"sendThrough": "0.0.0.0",
			"protocol": "freedom",
			"tag": "direct",
			"streamSettings": {
				"sockopt": {
					"mark": 255
				}
			}
		},
		{
			"sendThrough": "0.0.0.0",
			"protocol": "blackhole",
			"tag": "block",
			"streamSettings": {
				"sockopt": {
					"mark": 255
				}
			}
		}
	]
}
@w0330t w0330t changed the title 公网访问op中的局域网出错 公网访问路由器中的局域网服务器出错 Nov 4, 2019
@w0330t w0330t changed the title 公网访问路由器中的局域网服务器出错 公网访问局域网的服务器出错 Nov 4, 2019
@kuoruan
Copy link
Owner

kuoruan commented Nov 4, 2019

#35

@kuoruan
Copy link
Owner

kuoruan commented Nov 5, 2019

试试新发布的 v1.3.3-1

@w0330t
Copy link
Author

w0330t commented Nov 5, 2019

测试了一下大概是好了,谢谢。

@LitchiCherry
Copy link

1.7.5版本也遇到这个问题哎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants