caddy

package module
v0.0.0-...-98db5b4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

README

Caddy Module

The Caddy module provides an app and handler for Caddy Server (https://caddyserver.com/) allowing it to turn any Caddy Server into an Outline Shadowsocks backend.

Prerequisites

Usage

From this directory, build and run a custom binary with xcaddy:

xcaddy run --config config_example.json --watch

In a separate window, confirm you can fetch a page using this server:

go run github.com/Jigsaw-Code/outline-sdk/x/examples/fetch -transport "ss://chacha20-ietf-poly1305:Secret1@:9000" http://ipinfo.io

Prometheus metrics are available on http://localhost:9091/metrics.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyConfig

type KeyConfig struct {
	ID     string
	Cipher string
	Secret string
}

type ModuleRegistration

type ModuleRegistration caddy.ModuleInfo

func (ModuleRegistration) CaddyModule

func (m ModuleRegistration) CaddyModule() caddy.ModuleInfo

CaddyModule implements the caddy.Module interface

type OutlineApp

type OutlineApp struct {
	ShadowsocksConfig *ShadowsocksConfig `json:"shadowsocks,omitempty"`

	ReplayCache outline.ReplayCache

	Metrics outline.ServiceMetrics
	// contains filtered or unexported fields
}

func (OutlineApp) CaddyModule

func (OutlineApp) CaddyModule() caddy.ModuleInfo

func (*OutlineApp) Provision

func (app *OutlineApp) Provision(ctx caddy.Context) error

Provision sets up Outline.

func (*OutlineApp) Start

func (app *OutlineApp) Start() error

Start starts the App.

func (*OutlineApp) Stop

func (app *OutlineApp) Stop() error

Stop stops the App.

type ShadowsocksConfig

type ShadowsocksConfig struct {
	ReplayHistory int `json:"replay_history,omitempty"`
}

type ShadowsocksHandler

type ShadowsocksHandler struct {
	Keys []KeyConfig `json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*ShadowsocksHandler) CaddyModule

func (*ShadowsocksHandler) CaddyModule() caddy.ModuleInfo

func (*ShadowsocksHandler) Handle

Handle implements layer4.NextHandler.

func (*ShadowsocksHandler) Provision

func (h *ShadowsocksHandler) Provision(ctx caddy.Context) error

Provision implements caddy.Provisioner.

Jump to

Keyboard shortcuts

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