onramp

High-level, easy-to-use listeners and clients for I2P and onion URL's from Go. Provides only the most widely-used functions in a basic way. It expects nothing from the users, an otherwise empty instance of the structs will listen and dial I2P Streaming and Tor TCP sessions successfully.

In all cases, it assumes that keys are "persistent" in that they are managed maintained between usages of the same application in the same configuration. This means that hidden services will maintain their identities, and that clients will always have the same return addresses. If you don't want this behavior, make sure to delete the "keystore" when your app closes or when your application needs to cycle keys by calling the Garlic.DeleteKeys() or Onion.DeleteKeys() function. For more information, check out the godoc .

STATUS: This project is maintained. I will respond to issues, pull requests, and feature requests within a few days.

Usage

Basic usage is designed to be very simple, import the package and instantiate a struct and you're ready to go.

For more extensive examples, see: EXAMPLE

I2P(Garlic) Usage:

When using it to manage an I2P session, set up an onramp.Garlic struct.

package main

import (
	"log"

	"github.com/eyedeekay/onramp"
)

func main() {
	garlic := &onramp.Garlic{}
	defer garlic.Close()
	listener, err := garlic.Listen()
	if err != nil {
		log.Fatal(err)
	}
	defer listener.Close()
}

Tor(Onion) Usage:

When using it to manage a Tor session, set up an onramp.Onion struct.

package main

import (
	"log"

	"github.com/eyedeekay/onramp"
)

func main() {
	onion := &onramp.Onion{}
	defer garlic.Close()
	listener, err := onion.Listen()
	if err != nil {
		log.Fatal(err)
	}
	defer listener.Close()
}
Show license
MIT License

Copyright (c) 2022 idk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Hide license
I2P