Code Monkey home page Code Monkey logo

Comments (9)

sky-chy avatar sky-chy commented on May 18, 2024

初步排查到是inbounds[settings][clients]中的id有问题,难道这个id有一定的规则?

from xray-examples.

sky-chy avatar sky-chy commented on May 18, 2024

最终根据以下网址确定确实是ID的问题

https://xtls.github.io/config/inbounds/vless.html#clientobject

XTLS/Xray-core#158

from xray-examples.

rianwg avatar rianwg commented on May 18, 2024

帅哥,后来你怎么解决的,方便给个QQ或者微信什么的吗..

from xray-examples.

sky-chy avatar sky-chy commented on May 18, 2024

帅哥,后来你怎么解决的,方便给个QQ或者微信什么的吗..

我的问题就是出在clients的id那里,那个id需要遵循UUIDv5的标准去生成了,但是不知道你的ID是不是自己随便写的?

from xray-examples.

sky-chy avatar sky-chy commented on May 18, 2024

帅哥,后来你怎么解决的,方便给个QQ或者微信什么的吗..

如果你的id是确定没问题的,直接照搬我上面那份文件,修改port、listen、serverName、certificates和tag下面的内容,
然后你有多少个IP,就写多少个inbounds节点和outbounds节点,然后把ip都替换到listen那里,
最后在routing的rules对它们两两绑定就好了

我上面那个配置是vless+xtls+tcp的配置

from xray-examples.

rianwg avatar rianwg commented on May 18, 2024

用的是一健安装脚本,这样运行不了.
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbounds": [
{
"port": 31080,
"listen":"156.226.00.00",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "30f44380-f373-42c3-90f6-f9bea054dcb6",
"level": 1,
"alterId": 0
}
]
},
"streamSettings": {
"network": "tcp"
},
"tag": "164-in"
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
}
,
{
"port": 31081,
"listen":"156.253.00.00",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "30f44380-f373-42c3-90f6-f9bea054dcb7",
"level": 1,
"alterId": 0
}
]
},
"streamSettings": {
"network": "tcp"
},
"tag": "59-in"
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
},

    "routing":{
    "rules":[
        {
            "type":"field",
            "inboundTag":"164-in",
            "outboundTag":"164-out"
        },
        {
            "type":"field",
            "inboundTag":"59-in",
            "outboundTag":"59-out"
        },
    ]
},

"outbounds": [
	{
		"sendThrough":"156.226.00.000",
		"protocol": "freedom",
		"settings": {},
		"tag": "164-out"
	},
	{
		"sendThrough":"156.253.00.00",
		"protocol": "freedom",
			"settings": {},
		"tag": "59-out"
	},	
	
	{
		"protocol": "blackhole",
		"settings": {},
		"tag": "blocked"
    },
	{
		"protocol": "mtproto",
		"settings": {},
		"tag": "tg-out"
	}

],
"dns": {
	"servers": [
		"https+local://8.8.8.8/dns-query",
		"8.8.8.8",
		"1.1.1.1",
		"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",
			"domain": [
				"domain:epochtimes.com",
				"domain:epochtimes.com.tw",
				"domain:epochtimes.fr",
				"domain:epochtimes.de",
				"domain:epochtimes.jp",

from xray-examples.

sky-chy avatar sky-chy commented on May 18, 2024

用的是一健安装脚本,这样运行不了. { "log": { "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log", "loglevel": "warning" }, "inbounds": [ { "port": 31080, "listen":"156.226.00.00", "protocol": "vmess", "settings": { "clients": [ { "id": "30f44380-f373-42c3-90f6-f9bea054dcb6", "level": 1, "alterId": 0 } ] }, "streamSettings": { "network": "tcp" }, "tag": "164-in" "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ] } } , { "port": 31081, "listen":"156.253.00.00", "protocol": "vmess", "settings": { "clients": [ { "id": "30f44380-f373-42c3-90f6-f9bea054dcb7", "level": 1, "alterId": 0 } ] }, "streamSettings": { "network": "tcp" }, "tag": "59-in" "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ] } },

    "routing":{
    "rules":[
        {
            "type":"field",
            "inboundTag":"164-in",
            "outboundTag":"164-out"
        },
        {
            "type":"field",
            "inboundTag":"59-in",
            "outboundTag":"59-out"
        },
    ]
},

"outbounds": [
	{
		"sendThrough":"156.226.00.000",
		"protocol": "freedom",
		"settings": {},
		"tag": "164-out"
	},
	{
		"sendThrough":"156.253.00.00",
		"protocol": "freedom",
			"settings": {},
		"tag": "59-out"
	},	
	
	{
		"protocol": "blackhole",
		"settings": {},
		"tag": "blocked"
    },
	{
		"protocol": "mtproto",
		"settings": {},
		"tag": "tg-out"
	}

],
"dns": {
	"servers": [
		"https+local://8.8.8.8/dns-query",
		"8.8.8.8",
		"1.1.1.1",
		"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",
			"domain": [
				"domain:epochtimes.com",
				"domain:epochtimes.com.tw",
				"domain:epochtimes.fr",
				"domain:epochtimes.de",
				"domain:epochtimes.jp",

你这个我看着好乱啊,不过,有类似“156.226.00.00”这些IP的吗?恕我孤陋寡闻了,你看看日志里面报什么错吧,盲猜不一定正确

from xray-examples.

ojdev avatar ojdev commented on May 18, 2024

的确你的Id是不对的,这个地方是Guid也叫UUID,里面的字符只能是0到9和A到F不区分大小写是16进制数字,其他的都是无效的。

from xray-examples.

yuhan6665 avatar yuhan6665 commented on May 18, 2024

close as solved

from xray-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.