Documentation ¶
Index ¶
- Variables
- func AddCertPermission(KeyFile, CertFile, TokenFile string, in *os.File) error
- func Execute()
- func GenerateCA(CertName string, OutputFolder string, Length int) error
- func GenerateCertificate(CertName string, DNSName string, CAFolder string, OutputFolder string, ...) error
- func GenerateConfigToFolder(RouterAddress string, CAFolder string, ServerDNS string, TokenFile string, ...) error
- func GenerateConfigZip(RouterAddress string, CAFolder string, ServerDNS string, TokenFile string, ...) error
- func GenerateWebhookHashToken(Token string) string
- func InvokeEndpointService(ctx context.Context, ConfigFile []string, Channel string, Command []string, ...) (string, error)
- func MountLocal(ConfigFile []string, Channel, LocalAddr string) error
- func MountLocalListener(ConfigFile []string, Channel string, LocalListener net.Listener) error
- func MountRemote(ConfigFile []string, Channel, RemoteAddr string) error
- func PrepareConfigFiles(RouterAddress string, CAFolder string, ServerDNS string, TokenFile string, ...) (map[string][]byte, string, error)
- func StartEndpointService(ctx context.Context, ConfigFile []string, Channel string, ACL []string, ...) error
- func StartEndpointWebhookProxy(ctx context.Context, ConfigFile []string, LocalAddr, HashToken string) error
- func StartRouter(ConfigFile []string) error
Constants ¶
This section is empty.
Variables ¶
var Version string
Version is the version number of this program, should be populated while building.
Functions ¶
func AddCertPermission ¶ added in v0.0.16
AddCertPermission adds a new ACL rule into `TokenFile` for clients using `CertFile` and `KeyFile`.
func GenerateCA ¶ added in v0.0.16
GenerateCA generates a CA with `CertName` as its common name, and stores `ca.key` and `ca.cert` into `OutputFolder`.
func GenerateCertificate ¶ added in v0.0.16
func GenerateCertificate(CertName string, DNSName string, CAFolder string, OutputFolder string, Length int) error
GenerateCertificate generates a certificate signed by CA stored in `CAFolder`.
func GenerateConfigToFolder ¶ added in v0.0.16
func GenerateConfigToFolder(RouterAddress string, CAFolder string, ServerDNS string, TokenFile string, OutputFolder string, ConfigBaseFolderOverride string, Length int) error
GenerateConfigToFolder generates configs into the Output folder.
func GenerateConfigZip ¶ added in v0.0.16
func GenerateConfigZip(RouterAddress string, CAFolder string, ServerDNS string, TokenFile string, ConfigFile string, ConfigBaseFolderOverride string, Length int) error
GenerateConfigZip generates a zip file including a whole set of configuration required to connect to yukino-net.
func GenerateWebhookHashToken ¶ added in v0.0.16
GenerateWebhookHashToken creates a salted token as a webhook server side token.
func InvokeEndpointService ¶ added in v0.0.16
func InvokeEndpointService(ctx context.Context, ConfigFile []string, Channel string, Command []string, PrivateKey string, timeout time.Duration) (string, error)
InvokeEndpointService invokes an endpoint service serving on `Channel`. `PrivateKey` can be empty if authenticaiton is not set on the server side.
func MountLocal ¶ added in v0.0.16
MountLocal mountes a channel to a local address.
func MountLocalListener ¶ added in v0.0.16
MountLocalListener mounts a channel to a listener.
func MountRemote ¶ added in v0.0.16
MountRemote mountes a remote address as a `channel` on yukino-net.
func PrepareConfigFiles ¶ added in v0.0.16
func PrepareConfigFiles(RouterAddress string, CAFolder string, ServerDNS string, TokenFile string, ConfigBaseFolderOverride string, Length int) (map[string][]byte, string, error)
PrepareConfigFiles generates a config set in map[filename] = filedata format.
func StartEndpointService ¶ added in v0.0.16
func StartEndpointService(ctx context.Context, ConfigFile []string, Channel string, ACL []string, BaseCommand string) error
StartEndpointService starts an endpoint service listening on `Channel`.
func StartEndpointWebhookProxy ¶ added in v0.0.16
func StartEndpointWebhookProxy(ctx context.Context, ConfigFile []string, LocalAddr, HashToken string) error
StartEndpointWebhookProxy creates a web service that can proxy an endpoint invoke.
func StartRouter ¶ added in v0.0.16
StartRouter creates a router service.
Types ¶
This section is empty.