### Hysteria2 Build Targets Source: https://github.com/herrymeg/hysteria2/blob/master/platforms.txt Lists the supported operating systems and their corresponding CPU architectures for building Hysteria2. This configuration is used to control cross-compilation targets. ```plaintext # This file controls what platform/architecture combinations we build for a release. # Windows windows/amd64 windows/amd64-avx windows/386 windows/arm64 # macOS darwin/amd64 darwin/amd64-avx darwin/arm64 # Linux linux/amd64 linux/amd64-avx linux/386 linux/arm linux/armv5 linux/arm64 linux/s390x linux/mipsle linux/mipsle-sf linux/riscv64 # Android android/386 android/amd64 android/armv7 android/arm64 # FreeBSD freebsd/amd64 freebsd/amd64-avx freebsd/386 freebsd/arm freebsd/arm64 ``` -------------------------------- ### Hysteria Protocol TCP Proxy Request Source: https://github.com/herrymeg/hysteria2/blob/master/PROTOCOL.md Details the message format for initiating a TCP proxy connection over a QUIC stream. Includes address and padding information. ```APIDOC [varint] 0x401 (TCPRequest ID) [varint] Address length [bytes] Address string (host:port) [varint] Padding length [bytes] Random padding ``` -------------------------------- ### Hysteria Protocol Authentication Response Source: https://github.com/herrymeg/hysteria2/blob/master/PROTOCOL.md Defines the HTTP/3 response format a Hysteria server MUST send upon successful authentication. Details the status code and optional headers. ```APIDOC :status: 233 HyOK Hysteria-UDP: [true/false] Hysteria-CC-RX: [uint/"auto"] Hysteria-Padding: [string] `Hysteria-UDP`: Whether the server supports UDP relay. `Hysteria-CC-RX`: Server's maximum receive rate in bytes per second. A value of 0 indicates unlimited; "auto" indicates the server refuses to provide a value and ask the client to use congestion control to determine the rate on its own. `Hysteria-Padding`: A random padding string of variable length. ``` -------------------------------- ### Hysteria 2 Congestion Control Headers Source: https://github.com/herrymeg/hysteria2/blob/master/PROTOCOL.md Describes how client and server exchange receive rates during authentication using the 'Hysteria-CC-RX' header for congestion control. It outlines special cases for rate negotiation. ```plaintext Client sends 'Hysteria-CC-RX' header with its rx rate. Server responds with its rx rate or 'auto'. ``` -------------------------------- ### Hysteria Protocol Authentication Request Source: https://github.com/herrymeg/hysteria2/blob/master/PROTOCOL.md Specifies the HTTP/3 request format a Hysteria client MUST send to authenticate with a server. Includes details on required headers and their purpose. ```APIDOC :method: POST :path: /auth :host: hysteria Hysteria-Auth: [string] Hysteria-CC-RX: [uint] Hysteria-Padding: [string] `Hysteria-Auth`: Authentication credentials. `Hysteria-CC-RX`: Client's maximum receive rate in bytes per second. A value of 0 indicates unknown. `Hysteria-Padding`: A random padding string of variable length. ``` -------------------------------- ### Hysteria 2 'Salamander' Obfuscation Source: https://github.com/herrymeg/hysteria2/blob/master/PROTOCOL.md Details the 'Salamander' obfuscation layer, which encapsulates QUIC packets using a salt and BLAKE2b-256 hash for payload obfuscation. It specifies the hashing and XOR obfuscation algorithms. ```plaintext Format: [8 bytes] Salt [bytes] Payload Hash calculation: hash = BLAKE2b-256(key + salt) Obfuscation: payload[i] ^= hash[i % 32] ``` ```python import hashlib def obfuscate(payload, key, salt): hash_val = hashlib.blake2b(key + salt, digest_size=32).digest() obfuscated_payload = bytearray(len(payload)) for i in range(len(payload)): obfuscated_payload[i] = payload[i] ^ hash_val[i % 32] return bytes(obfuscated_payload) def deobfuscate(obfuscated_payload, key, salt): return obfuscate(obfuscated_payload, key, salt) # Same algorithm for deobfuscation ``` -------------------------------- ### Hysteria 2 UDP Packet Format Source: https://github.com/herrymeg/hysteria2/blob/master/PROTOCOL.md Defines the structure of UDP packets encapsulated for Hysteria 2, including session ID, packet ID, fragmentation information, address, and payload. This format is used for unreliable datagrams over QUIC. ```plaintext [uint32] Session ID [uint16] Packet ID [uint8] Fragment ID [uint8] Fragment count [varint] Address length [bytes] Address string (host:port) [bytes] Payload ``` -------------------------------- ### Hysteria Protocol TCP Proxy Response Source: https://github.com/herrymeg/hysteria2/blob/master/PROTOCOL.md Specifies the response format from the server for a TCP proxy request, indicating success or failure and providing status messages. ```APIDOC [uint8] Status (0x00 = OK, 0x01 = Error) [varint] Message length [bytes] Message string [varint] Padding length [bytes] Random padding ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.