reposam

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: MIT Imports: 10 Imported by: 1

README

RepoSAM

A self-configuring Debian repository for I2P based on repogen and sam-forwarder. Works as an alternative launcher for a repogen apt server that automatically forwards it to I2P.

Compile/Installation

repogen is an apt repository management tool with a web interface.

With your GOPATH set:

    git clone https://github.com/eydeekay/reposam $GOPATH/src/github.com/eyedeekay/reposam
    cd $GOPATH/src/github.com/eyedeekay/reposam
    make
    sudo make install

Usage

    Usage of ./reposam/reposam:
     -a string
          hostname to serve on (default "127.0.0.1")
     -c	Use an encrypted leaseset(true or false)
     -de string
          sets the description field used in the Release file (default "generated by reposam")
     -f string
          Use an ini file for configuration (default "none")
     -g	Uze gzip(true or false) (default true)
     -gc
          generates the Contents index
     -gw
          generate a web interface for browsing the packages
     -i	save i2p keys(and thus destinations) across reboots (default true)
     -ib int
          Set inbound tunnel backup quantity(0 to 5) (default 2)
     -id string
          directory to look for packages (default "not_a_dir")
     -il int
          Set inbound tunnel length(0 to 7) (default 2)
     -iq int
          Set inbound tunnel quantity(0 to 15) (default 4)
     -iv int
          Set inbound tunnel length variance(-7 to 7)
     -key string
          private key for signing repository packages (default "invalid_sk.asc")
     -l string
          Type of access list to use, can be "whitelist" "blacklist" or "none". (default "none")
     -m string
          Certificate name to use (default "cert")
     -mo string
          overrides the maintainer of all packages
     -n string
          name to give the tunnel(default reposam) (default "reposam")
     -ob int
          Set outbound tunnel backup quantity(0 to 5) (default 2)
     -od string
          directory to output the repository (default "not_a_dir")
     -ol int
          Set outbound tunnel length(0 to 7) (default 2)
     -oq int
          Set outbound tunnel quantity(0 to 15) (default 4)
     -or string
          sets the origin field used in the Release file (default "reposam")
     -ov int
          Set outbound tunnel length variance(-7 to 7)
     -p string
          port to serve locally on (default "7888")
     -r	Reduce tunnel quantity when idle(true or false)
     -rc int
          Reduce idle tunnel quantity to X (0 to 5) (default 3)
     -rt int
          Reduce tunnel quantity after X (milliseconds) (default 600000)
     -sh string
          sam host to connect to (default "127.0.0.1")
     -sp string
          sam port to connect to (default "7656")
     -sv
          show the version
     -t	Generate or use an existing TLS certificate
     -wa
          watch the input directory for new packages
     -wi int
          the interval to check for new packages (default 1)
     -z	Allow zero-hop, non-anonymous tunnels(true or false)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

func SetAccessList

func SetAccessList(s []string) func(*RepoSam) error

SetAccessList tells the system to treat the accessList as a whitelist

func SetAccessListType

func SetAccessListType(s string) func(*RepoSam) error

SetAccessListType tells the system to treat the accessList as a whitelist

func SetAllowZeroIn

func SetAllowZeroIn(b bool) func(*RepoSam) error

SetAllowZeroIn tells the tunnel to accept zero-hop peers

func SetAllowZeroOut

func SetAllowZeroOut(b bool) func(*RepoSam) error

SetAllowZeroOut tells the tunnel to accept zero-hop peers

func SetCloseIdle

func SetCloseIdle(b bool) func(*RepoSam) error

SetCloseIdle tells the connection to close it's tunnels during extended idle time.

func SetCloseIdleTime

func SetCloseIdleTime(u int) func(*RepoSam) error

SetCloseIdleTime sets the time to wait before closing tunnels to idle levels

func SetCloseIdleTimeMs

func SetCloseIdleTimeMs(u int) func(*RepoSam) error

SetCloseIdleTimeMs sets the time to wait before closing tunnels to idle levels in milliseconds

func SetCompress

func SetCompress(b bool) func(*RepoSam) error

SetCompress tells clients to use compression

func SetDescription

func SetDescription(s string) func(*RepoSam) error

SetDescription sets the maintainer override for the apt repo

func SetEncrypt

func SetEncrypt(b bool) func(*RepoSam) error

SetEncrypt tells the router to use an encrypted leaseset

func SetFastRecieve

func SetFastRecieve(b bool) func(*RepoSam) error

SetFastRecieve tells clients to use compression

func SetFilePath

func SetFilePath(s string) func(*RepoSam) error

SetFilePath sets the path to save the config file at.

func SetGenContents

func SetGenContents(b bool) func(*RepoSam) error

SetCloseIdle tells the connection to close it's tunnels during extended idle time.

func SetHost

func SetHost(s string) func(*RepoSam) error

SetHost sets the host of the service to forward

func SetInBackups

func SetInBackups(u int) func(*RepoSam) error

SetInBackups sets the inbound tunnel backups

func SetInLength

func SetInLength(u int) func(*RepoSam) error

SetInLength sets the number of hops inbound

func SetInQuantity

func SetInQuantity(u int) func(*RepoSam) error

SetInQuantity sets the inbound tunnel quantity

func SetInVariance

func SetInVariance(i int) func(*RepoSam) error

SetInVariance sets the variance of a number of hops inbound

func SetKeyFile

func SetKeyFile(s string) func(*RepoSam) error

SetKeyFile sets

func SetLeaseSetKey

func SetLeaseSetKey(s string) func(*RepoSam) error

SetLeaseSetKey sets the host of the RepoSam's SAM bridge

func SetLeaseSetPrivateKey

func SetLeaseSetPrivateKey(s string) func(*RepoSam) error

SetLeaseSetPrivateKey sets the host of the RepoSam's SAM bridge

func SetLeaseSetPrivateSigningKey

func SetLeaseSetPrivateSigningKey(s string) func(*RepoSam) error

SetLeaseSetPrivateSigningKey sets the host of the RepoSam's SAM bridge

func SetMaintainerOverride

func SetMaintainerOverride(s string) func(*RepoSam) error

SetMaintainerOverride sets the maintainer override for the apt repo

func SetMessageReliability

func SetMessageReliability(s string) func(*RepoSam) error

SetMessageReliability sets the host of the RepoSam's SAM bridge

func SetName

func SetName(s string) func(*RepoSam) error

SetName sets the host of the RepoSam's SAM bridge

func SetOrigin

func SetOrigin(s string) func(*RepoSam) error

SetOrigin sets the maintainer override for the apt repo

func SetOutBackups

func SetOutBackups(u int) func(*RepoSam) error

SetOutBackups sets the inbound tunnel backups

func SetOutLength

func SetOutLength(u int) func(*RepoSam) error

SetOutLength sets the number of hops outbound

func SetOutQuantity

func SetOutQuantity(u int) func(*RepoSam) error

SetOutQuantity sets the outbound tunnel quantity

func SetOutVariance

func SetOutVariance(i int) func(*RepoSam) error

SetOutVariance sets the variance of a number of hops outbound

func SetPort

func SetPort(s string) func(*RepoSam) error

SetPort sets the port of the service to forward

func SetPrivateKey

func SetPrivateKey(s []byte) func(*RepoSam) error

SetPrivateKey sets the maintainer override for the apt repo

func SetReduceIdle

func SetReduceIdle(b bool) func(*RepoSam) error

SetReduceIdle tells the connection to reduce it's tunnels during extended idle time.

func SetReduceIdleQuantity

func SetReduceIdleQuantity(u int) func(*RepoSam) error

SetReduceIdleQuantity sets minimum number of tunnels to reduce to during idle time

func SetReduceIdleTime

func SetReduceIdleTime(u int) func(*RepoSam) error

SetReduceIdleTime sets the time to wait before reducing tunnels to idle levels

func SetReduceIdleTimeMs

func SetReduceIdleTimeMs(u int) func(*RepoSam) error

SetReduceIdleTimeMs sets the time to wait before reducing tunnels to idle levels in milliseconds

func SetSAMHost

func SetSAMHost(s string) func(*RepoSam) error

SetSAMHost sets the host of the RepoSam's SAM bridge

func SetSAMPort

func SetSAMPort(s string) func(*RepoSam) error

SetSAMPort sets the port of the RepoSam's SAM bridge using a string

func SetSaveFile

func SetSaveFile(b bool) func(*RepoSam) error

SetSaveFile tells the router to save the tunnel's keys long-term

func SetServeDir

func SetServeDir(s string) func(*RepoSam) error

SetServeDir sets the path to the directory you want to serve

func SetSigType

func SetSigType(s string) func(*RepoSam) error

SetSigType sets the type of the forwarder server

func SetType

func SetType(s string) func(*RepoSam) error

SetType sets the type of the forwarder server

func SetWatch

func SetWatch(b bool) func(*RepoSam) error

SetWatch tells the connection to close it's tunnels during extended idle time.

func SetWatchDir

func SetWatchDir(s string) func(*RepoSam) error

SetWatchDir sets the path to the directory you want to serve

func SetWatchInterval

func SetWatchInterval(b int) func(*RepoSam) error

SetWatchInterval tells the connection to close it's tunnels during extended idle time.

Types

type Option

type Option func(*RepoSam) error

Option is a RepoSam Option

type RepoSam

type RepoSam struct {
	*samforwarder.SAMForwarder
	*repogen.Repo
	// contains filtered or unexported fields
}

RepoSam is a structure which automatically configured the forwarding of a local service to i2p over the SAM API.

func NewRepoSam

func NewRepoSam(host, port string) (*RepoSam, error)

NewRepoSam makes a new SAM forwarder with default options, accepts host:port arguments

func NewRepoSamFromOptions

func NewRepoSamFromOptions(opts ...func(*RepoSam) error) (*RepoSam, error)

NewRepoSamFromOptions makes a new SAM forwarder with default options, accepts host:port arguments

func (*RepoSam) Close

func (f *RepoSam) Close() error

Close shuts the whole thing down.

func (*RepoSam) GetType

func (f *RepoSam) GetType() string

func (*RepoSam) Load

func (s *RepoSam) Load() (samtunnel.SAMTunnel, error)

func (*RepoSam) Serve

func (f *RepoSam) Serve() error

Serve starts the SAM connection and and forwards the local host:port to i2p

func (*RepoSam) ServeParent

func (f *RepoSam) ServeParent()

func (*RepoSam) ServeRepo added in v0.0.2

func (f *RepoSam) ServeRepo()

func (*RepoSam) Up

func (f *RepoSam) Up() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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