tlsproxy

package
v3.12.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package tlsproxy contains a censoring TLS proxy. Most traffic is passed through using the SNI to choose the hostname to connect to. Specific offending SNIs are censored by returning a TLS alert to the client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CensoringProxy

type CensoringProxy struct {
	// contains filtered or unexported fields
}

CensoringProxy is a censoring TLS proxy

func NewCensoringProxy

func NewCensoringProxy(
	keywords []string, uncensored Dialer,
) *CensoringProxy

NewCensoringProxy creates a new CensoringProxy instance using the specified list of keywords to censor. keywords is the list of keywords that trigger censorship if any of them appears in the SNII record of a ClientHello. dnsNetwork and dnsAddress are settings to configure the upstream, non censored DNS.

func (*CensoringProxy) Start

func (p *CensoringProxy) Start(address string) (net.Listener, error)

Start starts the censoring proxy.

type Dialer added in v3.13.0

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

Dialer establishes network connections

Jump to

Keyboard shortcuts

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