chika0801 / hysteria-install Goto Github PK
View Code? Open in Web Editor NEWHysteria 2 安装指南
Home Page: https://github.com/apernet/hysteria
Hysteria 2 安装指南
Home Page: https://github.com/apernet/hysteria
`listen: :443
tls:
cert: /root/fullchain.cer
key: /root/private.key
auth:
type: password
password: chika
resolver:
type: https
https:
addr: 1.1.1.1:443
timeout: 10s
acl:
inline:
- reject(all, udp/443)`
1、这里 证书cer和key文件怎么制作获取呢?
2、规则里为什么拒绝所有udp443呢?这个协议不是监听udp443么?拒绝了怎么用呢?
Hello, I’m using hysteria 2, as a server and I encountered a problem with the YAML config format. When I use the YAML config, I get an error message like this:
journalctl -u hysteria
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 systemd[1]: Started hysteria.service.
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: panic: runtime error: index out of range [-1]
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: goroutine 1 [running]:
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/yosuke-furukawa/json5/encoding/json5.stateInStringKey(0xc0000b51>
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/yosuke-furukawa/[email protected]/encoding/json5/scanner.go:4>
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/yosuke-furukawa/json5/encoding/json5.checkValid({0xc0001f2400, 0>
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/yosuke-furukawa/[email protected]/encoding/json5/scanner.go:2>
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/yosuke-furukawa/json5/encoding/json5.Unmarshal({0xc0001f2400, 0x>
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/yosuke-furukawa/[email protected]/encoding/json5/decode.go:73>
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: main.parseServerConfig({0xc0001f2400, 0xcb, 0x200})
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/apernet/hysteria/app/cmd/server.go:302 +0x56
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: main.glob..func5(0x18af020?, {0xffb627?, 0x2?, 0x2?})
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/apernet/hysteria/app/cmd/main.go:134 +0x1ff
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/spf13/cobra.(*Command).execute(0x18af020, {0xc00007f5a0, 0x2, 0x>
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/spf13/[email protected]/command.go:920 +0x847
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/spf13/cobra.(*Command).ExecuteC(0x18aea60)
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/spf13/[email protected]/command.go:1044 +0x3bd
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/spf13/cobra.(*Command).Execute(...)
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/spf13/[email protected]/command.go:968
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: main.main()
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 hysteria[5389]: github.com/apernet/hysteria/app/cmd/main.go:209 +0x25
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 systemd[1]: hysteria.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 24 14:48:33 ubuntu-4gb-fsn1-3 systemd[1]: hysteria.service: Failed with result 'exit-code'.
Jun 24 14:48:43 ubuntu-4gb-fsn1-3 systemd[1]: hysteria.service: Scheduled restart job, restart counter is at 1.
Jun 24 14:48:43 ubuntu-4gb-fsn1-3 systemd[1]: Stopped hysteria.service.
Jun 24 14:48:43 ubuntu-4gb-fsn1-3 systemd[1]: Started hysteria.service.
Jun 24 14:48:43 ubuntu-4gb-fsn1-3 hysteria[5397]: panic: runtime error: index out of range [-1]
Jun 24 14:48:43 ubuntu-4gb-fsn1-3 hysteria[5397]: goroutine 1 [running]:
However, when I convert the YAML config to JSON format, it works fine. Here is the YAML config that I used:
listen: :443
tls:
cert: /root/fullchain.cer
key: /root/private.key
auth:
type: password
password: chika
masquerade:
type: proxy
proxy:
url: https://www.deepl.com
rewriteHost: true
And here is the JSON config that works:
{
"listen": ":443",
"tls": {
"cert": "/root/fullchain.pem",
"key": "/root/privkey.pem"
},
"auth": {
"type": "password",
"password": "xxxxxxx"
},
"masquerade": {
"type": "proxy",
"proxy": {
"url": "https://www.deepl.com",
"rewriteHost": true
}
}
}
I’m not sure what is causing this issue, but it seems like there is a bug with the YAML parser. Could you please look into this and fix it? Thank you for your great work on hysteria.
显示failed to load server config
可以正常使用,server log:
DEBUG TCP request {"addr": ".....", "id": "user", "reqAddr": "......."}
DEBUG TCP closed {"addr": ".....", "id": "user", "reqAddr": "......."}
请问大佬:
1、hysteria2升级到2.0.1了,我该如何操作也能够升级?
2、按照大佬脚本安装到ARM小鸡上,只需将curl -Lo /root/hysteria https://github.com/apernet/hysteria/releases/latest/download/hysteria-linux-amd64 && chmod +x /root/hysteria && mv -f /root/hysteria /usr/local/bin
修改成curl -Lo /root/hysteria https://github.com/apernet/hysteria/releases/latest/download/hysteria-linux-arm64 && chmod +x /root/hysteria && mv -f /root/hysteria /usr/local/bin吗?
还需要修改什么吗?
非常感谢大佬!!!
还是不能传输http3的数据,开了tun模式,我测试用的是YouTube视频测试的,显示http1.1
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.