Skip to content

net-hysteria.plugin.bash¤

hysteria install configurations.

group:postnet | runtype:minmon | deps: - | port: LO:1080

Usage
net-hysteria help|install|uninstall|download|disable|configgen|configapply|check|run
$ net-hysteria install - install hysteria
$ net-hysteria uninstall - uninstall hysteria
$ net-hysteria download - download hysteria package files to pkg dir
$ net-hysteria disable - disable hysteria plugin
$ net-hysteria configgen - generate hysteria configuration files
$ net-hysteria configapply - apply hysteria configuration files
$ net-hysteria check - check hysteria plugin status
$ net-hysteria run - run hysteria service
$ net-hysteria help - show this help message
Description

Hysteria is a feature-packed proxy & relay tool optimized for lossy, unstable connections.

Jangbi Configs¤

/opt/jangbi/.config
RUN_NET_HYSTERIA=1 # enable hysteria
HYSTERIA_PORTS="LO:1080" # ports to listen, LO - localhost, 1080 - SOCKS port

Check if running¤

bash command
$ ss -nltup|grep hysteria
tcp   LISTEN 0      128        127.0.0.1:1080       0.0.0.0:*    users:(("hysteria",pid=12345,fd=3))
$ pidof hysteria
12345

Current Configuration¤

Current configuration is stored in /etc/hysteria/. it is generated by net-hysteria configgen command on install. You can edit it manually and not run install or configapply commands to keep current configurations.

/etc/hysteria/config.yaml
# https://v2.hysteria.network/docs/getting-started/Server/#__tabbed_1_1
listen: :443

obfs:
  type: salamander 
  salamander:
    password: 123password

server: localhost

# openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out some.crt -keyout some.key -subj "/C=US/ST=State/L=City/O=Organization/OU=OrgUnit/CN=localhost"
tls: 
  cert: some.crt
  key: some.key
  sniGuard: strict

# acme:
#   domains:
#     - your.domain.net 
#   email: [email protected] 

auth: password

# trafficStats:
#   listen: :9999 
#   secret: some_secret 

# resolver: # otherwise, system resolver will be used
#   type: udp | tcp | tls | https 
#   tcp:
#     addr: 8.8.8.8:53 
#     timeout: 4s 
#   udp:
#     addr: 8.8.4.4:53 
#     timeout: 4s
#   tls:
#     addr: 1.1.1.1:853 
#     timeout: 10s
#     sni: cloudflare-dns.com 
#     insecure: false 
#   https:
#     addr: 1.1.1.1:443 
#     timeout: 10s
#     sni: cloudflare-dns.com
#     insecure: false

# sniff:
#   enable: true 
#   timeout: 2s 
#   rewriteDomain: false 
#   tcpPorts: 80,443,8000-9000 
#   udpPorts: all 

# masquerade: 
#   type: proxy
#   proxy:
#     url: https://news.ycombinator.com/ 
#     rewriteHost: true