beplugin

package
v0.0.0-...-8454787 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HELLO = iota + 10 // 10
	OK                // 11
	NOK               // 12
	BYE               // 13
)

WebUI Backend Protocol #1 - Main Commands

View Source
const (
	SET_HOST_NAME         = iota + 100 // 100
	CHANGE_ADMIN_PASSWORD              // 101
	REBOOT_SYSTEM                      // 102

	SET_WIREGUARD_INTERFACE = iota + 110 // 110
	ADD_WIREGUARD_PEER                   // 111
	REMOVE_WIREGUARD_PEER                // 112

	SET_ETHERNET_INTERFACE = iota + 120 // 120
	ADD_ROUTE_ENTRY                     // 121
	REMOVE_ROUTE_ENTRY                  // 122
	ADD_DEFAULT_GATEWAY                 // 123
	REMOVE_DEFAULT_GATEWAY              // 124
)

WebUI Backend Protocol #2 - Sub Commands

View Source
const (
	SERVER_PORT_DEFAULT = "127.0.0.1:51821"
)

Variables

This section is empty.

Functions

func Xsend

func Xsend(smsg *RequestMessage) bool

Types

type ReplyMessage

type ReplyMessage struct {
	Cmd string `cmd:=OK`
}

WebUI <- backend daemon

type RequestMessage

type RequestMessage struct {
	Cmd        string     `cmd:=HELLO`
	SubCmd     string     `subcmd:=wg_peer_add`
	FieldCount string     `field_count:=N`
	KeyValue   [16]string `keyN:=valueN`
}

WebUI -> backend daemon

Jump to

Keyboard shortcuts

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