quic_over_proxy

package module
v0.0.0-...-0575f4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 5 Imported by: 0

README

quic-over-proxy

Let the QUIC protocol using proxy server and reverse penetration.

Refer to and modified from WankkoRee/go-http3-proxy

Test
## Terminal_1
$ ADDRESS=:1080 go run ./examples/proxy
> Proxy is listening...

## Terminal_2
$ ADDRESS=:8080 go run ./examples/server
> Server is listening...

## Terminal_3
## This terminal depends on Terminal_1 & Terminal_2
$ TARGET=127.0.0.1:8080 PROXY=127.0.0.1:1080 go run ./examples/client
> 200 echo:'hello, server!'
> 200 echo:'hello, server!'
> 200 echo:'hello, server!'
...
Reverse
## Terminal_1
$ ADDRESS=:1080 go run ./examples/proxy
> Proxy is listening...

## Terminal_2
$ TARGET=127.0.0.1:8080 PROXY=127.0.0.1:1080 go run ./examples/client-as-server
> Client as Server is starting...

## Terminal_3
## This terminal depends on Terminal_1 & Terminal_2
$ ADDRESS=:8080 go run ./examples/server-as-client
> 200 echo:'hello, client as server!'
> 200 echo:'hello, client as server!'
> 200 echo:'hello, client as server!'
...

Docker

This example can also be run using docker.

Running
$ make -C examples down build up
proxy-1             | Proxy is listening...
server-1            | Server is listening...
client-as-server-1  | Client as Server is starting...
client-1            | 200 echo:'hello, server!'
server-as-client-1  | 200 echo:'hello, client as server!'
client-1            | 200 echo:'hello, server!'
server-as-client-1  | 200 echo:'hello, client as server!'
client-1            | 200 echo:'hello, server!'
server-as-client-1  | 200 echo:'hello, client as server!'
...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

func ListenAsDialer

func ListenAsDialer(l ListenConfig) Dialer

func NewDialer

func NewDialer(tlsCfg *tls.Config, cfg *quic.Config, proxyDialer Dialer, active bool) Dialer

type ListenConfig

type ListenConfig interface {
	Listen(ctx context.Context, network, address string) (net.Listener, error)
}

func DialerAsListen

func DialerAsListen(dialer Dialer) ListenConfig

func NewListenConfig

func NewListenConfig(tlsCfg *tls.Config, cfg *quic.Config, active bool) ListenConfig

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL