Skip to content

terassyi/go-softether-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoftEther VPN Server JSON-RPC API in Golang

This is the SoftEther VPN Server JSON-RPC API wrapper in Go. See a document for more information.

support

supported API methods

  • Test
  • GetServerInfo
  • GetServerStatus
  • CreateListener
  • EnumListener
  • DeleteListener
  • EnableListener
  • SetServerPassword
  • CreateHub
  • SetHub
  • EnumHub
  • DeleteHub
  • GetHubStatus
  • SetHubOnline
  • EnumConnection
  • DisconnectConnection
  • GetConnectionInfo
  • CreateLink
  • GetLink
  • SetLink
  • EnumLink
  • SetLinkOnline
  • SetLinkOffline
  • DeleteLink
  • CreateUser
  • SetUser
  • GetUser
  • EnumUser
  • EnableSecureNAT
  • DisableSecureNAT
  • SetSecureNATOption
  • GetSecureNATOption
  • EnumNAT
  • EnumDHCP
  • EnumEthernet
  • AddLocalBridge
  • DeleteLocalBridge
  • EnumLocalBridge
  • GetBridgeSupport

Usage

To use this package, import this package like bellow.

import softether "github.com/terassyi/go-softether-api"

First, you have to create a new Api instance.

api := softether.New("localhost", 443, "default", "password")

Second, You can create api methods you want to call. API methods are in methods package. These methods implement the Method interface. For example, to call Test method.

method := methods.NewTest()

And execute api.Call(). Then, result will return as map[string](interface{}).

res, err := api.Call(method)
	if err != nil {
		panic(err)
	}
	fmt.Println(res)

Future works

I'm making api methods as needed. Other methods will be supported.

About

SoftEther VPN Server JSON-RPC API in golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages