inazumav / v2bx Goto Github PK
View Code? Open in Web Editor NEWLicense: Mozilla Public License 2.0
License: Mozilla Public License 2.0
描述您想要的功能
合作,技术付费
描述您考虑过的替代方案
可否帮个忙,指导一二, 付费咨询,
或者我们合作,用你的服务器这写
可以留个联系方式,[email protected] v 13718004099
附加上下文
在此处添加有关功能请求的任何其他上下文或截图。
hysteria不支持一键设置端口跳跃吗
描述您想要的功能
hysteria协议
清晰简洁的功能描述。
hysteria协议现在好想对接V2board没办法订阅
描述您考虑过的替代方案
暂时没有就是特别喜欢hysteria协议
是否有任何替代方案可以解决这个问题?
附加上下文
在此处添加有关功能请求的任何其他上下文或截图。
描述该错误
启动报错
复现
V2bX start
环境和版本
Debian 11 x86 V2b 1.7.4 hy 一键脚本
V2bX
日志和错误
Aug 08 15:22:06 JP31N systemd[1]: Started V2bX Service.
Aug 08 15:22:07 JP31N V2bX[14543]: V2bX v2.0.4 (A V2board backend based on multi core)
Aug 08 15:22:07 JP31N V2bX[14543]: Supported cores: hy, xray
Aug 08 15:22:07 JP31N V2bX[14543]: This version need V2board version >= 1.7.0.
Aug 08 15:22:07 JP31N V2bX[14543]: The version have many changed for config, please check your config file
Aug 08 15:22:07 JP31N V2bX[14543]: time="2023-08-08T15:22:07+08:00" level=info msg="Start V2bX..."
Aug 08 15:22:07 JP31N V2bX[14543]: time="2023-08-08T15:22:07+08:00" level=fatal msg="Failed to parse the resolve preference" error="invalid preference: udp://8.8.8.8:53"
Aug 08 15:22:07 JP31N systemd[1]: V2bX.service: Main process exited, code=exited, status=1/FAILURE
Aug 08 15:22:07 JP31N systemd[1]: V2bX.service: Failed with result 'exit-code'.
额外的内容
config.yml
CoreConfig:
Type: "hy"
XrayConfig:
Log:
Level: warning # Log level: none, error, warning, info, debug
AccessPath: # /etc/XrayR/access.Log
ErrorPath: # /etc/XrayR/error.log
DnsConfigPath: # /etc/XrayR/dns.json # Path to dns config, check https://xtls.github.io/config/dns.html for help
RouteConfigPath: # /etc/XrayR/route.json # Path to route config, check https://xtls.github.io/config/routing.html for help
InboundConfigPath: # /etc/XrayR/custom_inbound.json # Path to custom inbound config, check https://xtls.github.io/config/inbound.html for help
OutboundConfigPath: # /etc/XrayR/custom_outbound.json # Path to custom outbound config, check https://xtls.github.io/config/outbound.html for help
ConnectionConfig:
Handshake: 4 # Handshake time limit, Second
ConnIdle: 30 # Connection idle time limit, Second
UplinkOnly: 2 # Time limit when the connection downstream is closed, Second
DownlinkOnly: 4 # Time limit when the connection is closed after the uplink is closed, Second
BufferSize: 64 # The internal cache size of each connection, kB
Nodes:
-
PanelType: "NewV2board" # Panel type: SSpanel, V2board, NewV2board, PMpanel, Proxypanel, V2RaySocks
ApiConfig:
ApiHost: "https://p.baidu.com"
ApiKey: "123.12321312312"
NodeID: 1
NodeType: hysteria # Node type: V2ray, Shadowsocks, Trojan
Timeout: 30 # Timeout for the api request
EnableVless: false # Enable Vless for V2ray Type
EnableXTLS: false # Enable XTLS for V2ray and Trojan
SpeedLimit: 0 # Mbps, Local settings will replace remote settings
DeviceLimit: 0 # Local settings will replace remote settings
ControllerConfig:
ListenIP: 0.0.0.0 # IP address you want to listen
UpdatePeriodic: 10 # Time to update the nodeinfo, how many sec.
EnableDNS: false # Use custom DNS config, Please ensure that you set the dns.json well
# XrayOptions:
# EnableDNS: false # Use custom DNS config, Please ensure that you set the dns.json well
# DNSType: AsIs # AsIs, UseIP, UseIPv4, UseIPv6, DNS strategy
# EnableTFO: false # Enable TCP Fast Open
# EnableProxyProtocol: false # Only works for WebSocket and TCP
# EnableFallback: false # Only support for Trojan and Vless
# FallBackConfigs: # Support multiple fallbacks
# - SNI: # TLS SNI(Server Name Indication), Empty for any
# Alpn: # Alpn, Empty for any
# Path: # HTTP PATH, Empty for any
# Dest: 80 # Required, Destination of fallback, check https://xtls.github.io/config/features/fallback.html for details.
# ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for disable
HyOptions:
Resolver: "udp://8.8.8.8:53" # DNS resolver address
ResolvePreference: "4" # DNS IPv4/IPv6 preference. Available options: "64" (IPv6 first, fallback to IPv4), "46" (IPv4 first, fallback to IPv6), "6" (IPv6 only), "4" (IPv4 only)
SendDevice: "eth0" # Bind device for outbound connections (usually requires root)
CertConfig:
CertMode: http # Option about how to get certificate: none, file, http, tls, dns. Choose "none" will forcedly disable the tls config.
CertDomain: "11.baidu.com" # Domain to cert #<▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️▪️
CertFile: /etc/XrayR/cert/node1.test.com.cert # Provided if the CertMode is file
KeyFile: /etc/XrayR/cert/node1.test.com.key
Provider: cloudflare # DNS cert provider, Get the full support list here: https://go-acme.github.io/lego/dns/
Email: [email protected]
报错如下:
xrayr_1 | V2bX 1.7.2 (A V2board backend based on multi core)
xrayr_1 | Supported cores: sing, xray
xrayr_1 | This version need V2board version >= 1.7.0.
xrayr_1 | The version have many changed for config, please check your config file
xrayr_1 | time="2023-10-19T13:12:09+08:00" level=panic msg="Failed to understand Routing config Please check: https://xtls.github.io/config/routing.html" err="infra/conf: invalid field rule > infra/conf: failed to parse domain rule: geosite:netflix > infra/conf: failed to load geosite: NETFLIX > infra/conf: failed to load file: geosite.dat > infra/conf: failed to open file: geosite.dat > open geosite.dat: no such file or directory"
xrayr_1 | panic: (*logrus.Entry) 0xc0010fd030
xrayr_1 |
xrayr_1 | goroutine 1 [running]:
xrayr_1 | github.com/sirupsen/logrus.(*Entry).log(0xc0010fcfc0, 0x0, {0xc000100900, 0x5d})
xrayr_1 | github.com/sirupsen/[email protected]/entry.go:260 +0x491
xrayr_1 | github.com/sirupsen/logrus.(*Entry).Log(0xc0010fcfc0, 0x0, {0xc000e3f8a0?, 0x3308ae0?, 0xc00013b620?})
xrayr_1 | github.com/sirupsen/[email protected]/entry.go:304 +0x48
xrayr_1 | github.com/sirupsen/logrus.(*Entry).Panic(...)
xrayr_1 | github.com/sirupsen/[email protected]/entry.go:342
xrayr_1 | github.com/InazumaV/V2bX/core/xray.getCore(0xc00013b1a0)
xrayr_1 | github.com/InazumaV/V2bX/core/xray/xray.go:92 +0x667
xrayr_1 | github.com/InazumaV/V2bX/core/xray.New(0x2c4d8e0?)
xrayr_1 | github.com/InazumaV/V2bX/core/xray/xray.go:39 +0x17
xrayr_1 | github.com/InazumaV/V2bX/core.NewCore({0xc0010f9620?, 0x35bc810?, 0xc000e3fc38?})
xrayr_1 | github.com/InazumaV/V2bX/core/core.go:23 +0x56
xrayr_1 | github.com/InazumaV/V2bX/cmd.serverHandle(0xc0010f0d00?, {0x5e7ac40?, 0x4?, 0x35970b7?})
xrayr_1 | github.com/InazumaV/V2bX/cmd/server.go:69 +0x299
xrayr_1 | github.com/spf13/cobra.(*Command).execute(0x5e13ca0, {0x5e7ac40, 0x0, 0x0})
xrayr_1 | github.com/spf13/[email protected]/command.go:944 +0x863
xrayr_1 | github.com/spf13/cobra.(*Command).ExecuteC(0x5e14540)
xrayr_1 | github.com/spf13/[email protected]/command.go:1068 +0x3a5
xrayr_1 | github.com/spf13/cobra.(*Command).Execute(...)
xrayr_1 | github.com/spf13/[email protected]/command.go:992
xrayr_1 | github.com/InazumaV/V2bX/cmd.Run()
xrayr_1 | github.com/InazumaV/V2bX/cmd/cmd.go:15 +0x1a
xrayr_1 | main.main()
xrayr_1 | github.com/InazumaV/V2bX/main.go:6 +0xf
{
"domainStrategy": "rules",
"rules": [
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "cloudflare-warp",
"domain": [
"geosite:netflix",
"geosite:disney",
"geosite:openai",
"domain:openai.com",
"domain:ai.com",
"domain:azureedge.net",
"domain:cdn.auth0.com",
"domain:sentry.io",
"domain:intercomcdn.com",
"domain:intercom.io",
"domain:google-analytics.com",
"domain:identrust.com",
"domain:challenges.cloudflare.com",
"domain:ingest.sentry.io"
]
},
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "Direct",
"domain": [
"geosite:cn"
]
},
{
"type": "field",
"domainMatcher": "hybrid",
"domain": [
"geosite:geolocation-!cn",
"domain:googleapis.cn",
"domain:gstatic.com",
"domain:cp.cloudflare.com",
"dns.google"
],
"outboundTag": "IPv*_out"
},
{
"type": "field",
"domainMatcher": "hybrid",
"domain": [
"geosite:geolocation-!cn",
"domain:googleapis.cn",
"domain:gstatic.com",
"domain:cp.cloudflare.com",
"dns.google"
],
"outboundTag": "IPv*_out"
},
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "IP*_out",
"network": "udp,tcp"
},
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"ip": [
],
"domain": [
"geosite:category-ads-all"
]
},
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "Reject",
"domain": [
"geosite:category-ads-all",
"geosite:category-porn"
]
}
]
}
{
"domainStrategy": "rules",
"rules": [
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "cloudflare-warp",
"domain": [
"geosite:netflix",
"geosite:disney",
"geosite:openai",
"domain:openai.com",
"domain:ai.com",
"domain:azureedge.net",
"domain:cdn.auth0.com",
"domain:sentry.io",
"domain:intercomcdn.com",
"domain:intercom.io",
"domain:google-analytics.com",
"domain:identrust.com",
"domain:challenges.cloudflare.com",
"domain:ingest.sentry.io"
]
},
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "Direct",
"domain": [
"geosite:cn"
]
},
{
"type": "field",
"domainMatcher": "hybrid",
"domain": [
"geosite:geolocation-!cn",
"domain:googleapis.cn",
"domain:gstatic.com",
"domain:cp.cloudflare.com",
"dns.google"
],
"outboundTag": "IPv*_out"
},
{
"type": "field",
"domainMatcher": "hybrid",
"domain": [
"geosite:geolocation-!cn",
"domain:googleapis.cn",
"domain:gstatic.com",
"domain:cp.cloudflare.com",
"dns.google"
],
"outboundTag": "IPv*_out"
},
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "IP*_out",
"network": "udp,tcp"
},
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"ip": [
],
"domain": [
"geosite:category-ads-all"
]
},
{
"type": "field",
"domainMatcher": "hybrid",
"outboundTag": "Reject",
"domain": [
"geosite:category-ads-all",
"geosite:category-porn"
]
}
]
}
[root@host-by config]# cat config.json
{
"Log": {
"Level": "error",
"Output": ""
},
"Cores": [
{
"Type": "xray",
"Log": {
// 同 Xray-core log 部分配置
"Level": "error"
},
// 静态资源文件目录
"AssetPath": "",
// DNS配置文件目录
"DnsConfigPath": "/etc/V2bX/dns.json",
// 路由配置文件目录
"RouteConfigPath": "/etc/V2bX/route.json",
// 本地策略相关配置
"ConnectionConfig": {
// 详见 https://xtls.github.io/config/policy.html#levelpolicyobject
"handshake": 4,
"connIdle": 300,
"uplinkOnly": 2,
"downlinkOnly": 5,
"statsUserUplink": false,
"statsUserDownlink": false,
"bufferSize": 4
},
// Inbound配置文件目录
"InboundConfigPath": "/etc/V2bX/custom_inbound.json",
// Outbound配置文件目录
"OutboundConfigPath": "/etc/V2bX/custom_outbound.json"
}
],
"ApiHost": "",
"ApiKey": "",
"NodeID": 1,
"NodeType": "trojan",
"Timeout": 30,
"ListenIP": "0.0.0.0",
"SendIP": "0.0.0.0",
"EnableProxyProtocol": false,
"EnableTFO": true,
"DNSType": "UseIP",
// 证书相关配置
"CertConfig": {
// 证书申请模式,none、http、dns、self
"CertMode": "tls",
"RejectUnknownSni": true,
// 证书域名
"CertDomain": "",
// 证书文件目录
"CertFile": "/etc/V2bX/cert/ss.cert",
// 密钥文件目录
"KeyFile": "/etc/V2bX/cert/ss.key",
// 申请证书时使用的用户邮箱
"Email": "w",
// DNS解析提供者
"Provider": "cloudflare",
// DNS解析提供者的环境变量,详见 https://go-acme.github.io/lego/dns/
"DNSEnv": {
"CLOUDFLARE_EMAIL": "w",
"CLOUDFLARE_API_KEY": ""
}
}
}
# Build go
FROM golang:1.21-alpine AS builder
WORKDIR /app
ENV CGO_ENABLED=0
ENV version=v3.0.0
RUN apk --update --no-cache add tzdata ca-certificates git
RUN git clone https://github.com/InazumaV/V2bX.git . &&git checkout v3.0.0 && \
go build -v -o V2bX -tags "sing xray with_reality_server with_quic" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
# Release
FROM alpine
# 安装必要的工具包
RUN apk --update --no-cache add tzdata ca-certificates git \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN mkdir /etc/V2bX
COPY --from=builder /app/V2bX /usr/local/bin
COPY --from=builder /app/example /etc/V2bX
RUN mv /etc/V2bX/config.json /etc/V2bX/config.json
ENTRYPOINT [ "V2bX", "server"]
~
提供的 yml
version: '3.8'
services:
xrayr:
build:
context: ./
dockerfile: Dockerfile
volumes:
- ./config:/etc/V2bX # 映射配置文件夹
restart: always
network_mode: host
速度和时间,可以在注释里加一下对应的单位,感谢
Line 145 in af9fb20
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.