From 888fe2e1bbe5323154634997e6494c5266f4b796 Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 14 Aug 2019 13:21:49 -0400 Subject: [PATCH] experiment with word-based representation of base32 addresses for human-to-human transmission --- Makefile | 2 ++ interface/interface.go | 35 +++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index e52afe4..e315abf 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,8 @@ USR := usr/ LOCAL := local/ VERSION := 0.1 +GO111MODULE=on + echo: @echo "$(GOPATH)" find . -path ./.go -prune -o -name "*.go" -exec gofmt -w {} \; diff --git a/interface/interface.go b/interface/interface.go index 4d82e36..e1e10f3 100644 --- a/interface/interface.go +++ b/interface/interface.go @@ -5,19 +5,26 @@ import ( ) type SAMTunnel interface { - GetType() string - Cleanup() - Print() string - Props() map[string]string - Search(search string) string - Target() string - ID() string + + // Tunnel Options + GetType() string // Get the type of the tunnel in use(server, client, http, udp, etc) + Print() string // Print all the tunnel options as a string + Props() map[string]string //Get a full list of tunnel properties as a map for user display/analysis + Search(search string) string //Search the Props for a common term + Target() string //The address of the local client or service to forward with a SAM tunnel + ID() string //The user-chosen tunnel ID //Destination() string - Base32() string - Base64() string - Keys() i2pkeys.I2PKeys - Serve() error - Close() error - Up() bool - Load() (SAMTunnel, error) + + // Key handling + Base32() string // Get the .b32.i2p address of your service + Base32Readable() string // Create a more-readable representation of the .b32.i2p address using English words + Base64() string // Get the public base64 address of your I2P service + Keys() i2pkeys.I2PKeys // Get all the parts of the keys to your I2P service + + // Service Management + Load() (SAMTunnel, error) // Prepare tunnel keys and tunnel options + Serve() error // Start the tunnel + Close() error // Stop the tunnel and close all connections + Cleanup() // Stop the tunnel but leave the sockets alone for now + Up() bool // Return "true" if the tunnel is ready to go up. }