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

GRPC连接失败,端口已开放 #4

Closed
ghost opened this issue Oct 25, 2019 · 1 comment
Closed

GRPC连接失败,端口已开放 #4

ghost opened this issue Oct 25, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 25, 2019

一切配置正确,运行v2scar出现下面报错:

2019/10/26 02:46:32 [WARNING]: GRPC连接失败,请检查V2ray是否运行并开放对应grpc端口 当前GRPC地址: 127.0.0.1:8080

使用命令为:

./v2scar --api-endpoint="http://xxxx.xxxx/api/user_vmess_config/1/?token=xxxxx" --grpc-endpoint="127.0.0.1:8080" --sync-time=60

使用lsof -i:8080,已出现v2ray:

COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
v2ray   20064 root    5u  IPv4  66234      0t0  TCP localhost:webcache (LISTEN)

配置文件如下:

{
	"api": {
		"tag": "api",
		"services": [
			"HandlerService",
			"StatsService"
 		]
	},
	"log": {
		"access": "/var/log/v2ray/access.log",
		"error": "/var/log/v2ray/error.log",
		"loglevel": "warning"
	},
	"policy": {
		"levels": {
			"1": {
   				"statsUserUplink": true,
				"statsUserDownlink": true
			}
	},
	"system": {
 		"statsInboundUplink": true,
		"statsInboundDownlink": true
		}
	},
	"inbounds": [
		{
			"tag": "proxy",
			"port": 12345,
			"protocol": "vmess",
			"settings": {
				"clients": [
					{
						"id": "xxxxxxxxx-xxxxxx-xxxxxx-xxxxxx",
						"level": 1,
						"alterId": 233
					}
				]
			},
			"streamSettings": {
				"network": "tcp"
			},
			"sniffing": {
				"enabled": true,
				"destOverride": [
					"http",
					"tls"
				]
			}
		},
		{
			"listen": "127.0.0.1",
			"port": 8080,
			"protocol": "dokodemo-door",
			"settings": {
				"address": "127.0.0.1"
			},
			"tag": "api"
		}
	],
	"outbounds": [
		{
			"protocol": "freedom",
			"settings": {}
		},
		{
			"protocol": "blackhole",
			"settings": {},
			"tag": "blocked"
		},
		{
			"protocol": "freedom",
			"settings": {},
			"tag": "direct"
		},
		{
			"protocol": "mtproto",
			"settings": {},
			"tag": "tg-out"
		}
		//include_out_config
		//
	],
	"dns": {
		"server": [
			"1.1.1.1",
			"1.0.0.1",
			"8.8.8.8",
			"8.8.4.4",
			"localhost"
		]
	},
	"routing": {
		"domainStrategy": "IPOnDemand",	
		"rules": [
			{
				"type": "field",
				"ip": [
					"0.0.0.0/8",
					"10.0.0.0/8",
					"100.64.0.0/10",
					"127.0.0.0/8",
					"169.254.0.0/16",
					"172.16.0.0/12",
					"192.0.0.0/24",
					"192.0.2.0/24",
					"192.168.0.0/16",
					"198.18.0.0/15",
					"198.51.100.0/24",
					"203.0.113.0/24",
					"::1/128",
					"fc00::/7",
					"fe80::/10"
				],
				"outboundTag": "blocked"
			},
			{
				"type": "field",
				"inboundTag": ["tg-in"],
				"outboundTag": "tg-out"
			}
			,
                {
                    "type": "field",
                    "protocol": [
                        "bittorrent"
                    ],
                    "outboundTag": "blocked"
                },
			{
				"inboundTag": [
			  		"api"
				],
				"outboundTag": "api",
				"type": "field"
		  	}
			//include_ban_ad
			//include_rules
			//
		]
	},
	"strategy": "rules",
	"transport": {
		"kcpSettings": {
            "uplinkCapacity": 100,
            "downlinkCapacity": 100,
            "congestion": true
        },
		"sockopt": {
			"tcpFastOpen": true
		}
	}
}

使用的是233boy的脚本,自己修改了配置文件。
v2ray版本为:4.21.0,django-sspanel和grpc皆为最新版

@ghost
Copy link
Author

ghost commented Oct 25, 2019

已解决,是route中的127.0.0.1/8问题。现在开启提示这个:

2019/10/26 02:59:00 [INFO] Call initOrUpdateUser
2019/10/26 02:59:00 [ERROR]: rpc error: code = Unknown desc = v2ray.com/core/app/stats/command: QueryStats only works its own stats.Manager.
2019/10/26 02:59:01 [INFO] Call syncUserTrafficToServer ONLINE USER COUNT: 0
2019/10/26 03:00:01 [INFO] Call initOrUpdateUser
2019/10/26 03:00:01 [ERROR]: rpc error: code = Unknown desc = v2ray.com/core/app/stats/command: QueryStats only works its own stats.Manager.
2019/10/26 03:00:01 [INFO] Call syncUserTrafficToServer ONLINE USER COUNT: 0

不知道有没有影响?谢谢大佬

@ghost ghost closed this as completed Oct 29, 2019
This issue was closed.
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

0 participants