httpmirror

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 12 Imported by: 0

README

httpmirror

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotOK = fmt.Errorf("http status not ok")

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Println(v ...interface{})
}

type MirrorHandler

type MirrorHandler struct {
	// RemoteCache is the cache of the remote file system
	RemoteCache *sss.SSS
	// LinkExpires is the expires of links
	LinkExpires time.Duration
	// BaseDomain is the domain name suffix
	BaseDomain string
	// Client is used without the connect method
	Client *http.Client
	// ProxyDial specifies the optional proxyDial function for
	// establishing the transport connection.
	ProxyDial func(context.Context, string, string) (net.Conn, error)
	// NotFound Not proxy requests
	NotFound http.Handler
	// Logger error log
	Logger Logger
	// CheckSyncTimeout is the timeout for checking the sync
	CheckSyncTimeout time.Duration
	// HostFromFirstPath is the host from the first path
	HostFromFirstPath bool

	// BlockSuffix is for block some source
	BlockSuffix []string
	// contains filtered or unexported fields
}

MirrorHandler mirror handler

func (*MirrorHandler) ServeHTTP

func (m *MirrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis
cmd
httpmirror command

Jump to

Keyboard shortcuts

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