Sign inSign up

sn1p4am/claw-hy2-auth-proxy

By sn1p4am

•Updated 6 months ago

一个面向 Claw.Cloud 的 Hysteria2 Docker 镜像。

Image
Networking
0

218

sn1p4am/claw-hy2-auth-proxy repository overview

⁠claw-hy2-auth-proxy

Hysteria2 Docker image for Claw.Cloud.

Based on mc838/claw-hy2, this image keeps the original hy2 server capability and can also expose authenticated:

  • SOCKS5
  • HTTP
  • HTTPS CONNECT

It is designed for users who want a single container to provide both:

  • a Hysteria2 node
  • a public proxy endpoint

⁠Tags

  • sn1p4am/claw-hy2-auth-proxy:latest
  • sn1p4am/claw-hy2-auth-proxy:v1

⁠Quick Start

⁠Claw.Cloud

Application Name

claw-hy2-auth-proxy

Image Name

sn1p4am/claw-hy2-auth-proxy:v1

Compute Resources

CPU = 0.2
Memory = 128Mi
⁠Hysteria2 Only

Network Configuration

80 -> Public
5678 -> Public / UDP

Environment Variables

SERVER_DOMAIN=abc.eu-central-1.clawcloudrun.com
UDP_PORT=5678
PASSWORD=3fa85f64-5717-4562-b3fc-2c963f66afa6
⁠Hysteria2 + Authenticated Proxy

Network Configuration

80 -> Public
5678 -> Public / UDP
8080 -> Public / TCP

Environment Variables

SERVER_DOMAIN=abc.eu-central-1.clawcloudrun.com
UDP_PORT=5678
PASSWORD=3fa85f64-5717-4562-b3fc-2c963f66afa6
ENABLE_PROXY=true
PROXY_PORT=8080
PROXY_USERNAME=proxy
PROXY_PASSWORD=change-me
PROXY_DISABLE_UDP=false

Notes:

  • PROXY_PORT must be exposed as raw TCP
  • do not configure the proxy port as HTTP/HTTPS on Claw.Cloud
  • when proxy is enabled, PROXY_USERNAME and PROXY_PASSWORD are required

⁠How It Works

hysteria2 only provides SOCKS5 and HTTP in client mode, not in server mode.

This image works by running both:

  1. hysteria server
  2. hysteria client

The client connects back to 127.0.0.1:${UDP_PORT} and exposes:

  • hy2://
  • socks5://
  • http:// / HTTPS CONNECT

⁠Environment Variables

⁠Required
VariableDescriptionExample
SERVER_DOMAINPublic domain assigned by Claw.Cloudabc.eu-central-1.clawcloudrun.com
UDP_PORTInternal UDP port for Hysteria2 server5678
PASSWORDHysteria2 password3fa85f64-5717-4562-b3fc-2c963f66afa6
⁠Optional
VariableDescriptionDefault
ENABLE_PROXYEnable proxy modefalse
PROXY_PORTTCP port for SOCKS5 / HTTP proxy8080
PROXY_USERNAMEProxy username, required when proxy is enabledempty
PROXY_PASSWORDProxy password, required when proxy is enabledempty
PROXY_DISABLE_UDPDisable SOCKS5 UDPfalse

⁠Connection Info

The container logs will print connection info after startup.

⁠Hysteria2
hy2://PASSWORD@SERVER_DOMAIN:UDP_PORT?sni=bing.com&insecure=1
⁠SOCKS5
socks5://PROXY_USERNAME:PROXY_PASSWORD@SERVER_DOMAIN:PROXY_PORT
⁠HTTP / HTTPS CONNECT
http://PROXY_USERNAME:PROXY_PASSWORD@SERVER_DOMAIN:PROXY_PORT

⁠Dockerfile

FROM mc838/claw-hy2:latest

EXPOSE 5678/udp 8080/tcp

COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

⁠Notes

  • HTTPS proxy here means HTTP CONNECT, not a separate TLS-wrapped forward proxy port
  • if ENABLE_PROXY=false, the image behaves like a plain Hysteria2 server

Tag summary

Content type

Image

Digest

sha256:dcdb63120…

Size

17.2 MB

Last updated

6 months ago

docker pull sn1p4am/claw-hy2-auth-proxy