2022-08-03 22:00:33 -04:00
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<title>
|
|
|
|
|
onramp
|
|
|
|
|
</title>
|
|
|
|
|
<meta name="author" content="eyedeekay" />
|
|
|
|
|
<meta name="description" content="onramp.git" />
|
|
|
|
|
<meta name="keywords" content="main" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div id="navbar">
|
|
|
|
|
<a href="#shownav">
|
|
|
|
|
Show navigation
|
|
|
|
|
</a>
|
|
|
|
|
<div id="shownav">
|
|
|
|
|
<div id="hidenav">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="index.html">
|
|
|
|
|
index
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="DOCS.html">
|
|
|
|
|
DOCS
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
2022-08-03 23:47:24 -04:00
|
|
|
|
<li>
|
|
|
|
|
<a href="EXAMPLE.html">
|
|
|
|
|
EXAMPLE
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
2022-08-03 22:00:33 -04:00
|
|
|
|
</ul>
|
|
|
|
|
<br>
|
|
|
|
|
<a href="#hidenav">
|
|
|
|
|
Hide Navigation
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<h1>
|
|
|
|
|
<a href="/">
|
|
|
|
|
onramp
|
|
|
|
|
</a>
|
|
|
|
|
</h1>
|
|
|
|
|
<p>
|
|
|
|
|
High-level, easy-to-use listeners and clients for I2P and onion URL’s from Go.
|
2022-08-03 23:47:24 -04:00
|
|
|
|
Provides only the most widely-used functions in a basic way. It expects nothing
|
2022-08-03 23:50:42 -04:00
|
|
|
|
from the users, an otherwise empty instance of the structs will listen and dial
|
2022-08-03 23:47:24 -04:00
|
|
|
|
I2P Streaming and Tor TCP sessions successfully.
|
2022-08-03 22:00:33 -04:00
|
|
|
|
</p>
|
2022-08-04 00:02:05 -04:00
|
|
|
|
<p>
|
|
|
|
|
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
|
|
|
|
|
<code>
|
|
|
|
|
Garlic.DeleteKeys()
|
|
|
|
|
</code>
|
2022-08-04 17:35:49 -04:00
|
|
|
|
or `Onion.DeleteKeys()
|
|
|
|
|
function. For more information, check out the
|
|
|
|
|
<a href="http://pkg.go.dev/github.com/eyedeekay/onramp" rel="nofollow">
|
|
|
|
|
godoc
|
|
|
|
|
</a>
|
|
|
|
|
.
|
2022-08-04 00:02:05 -04:00
|
|
|
|
</p>
|
2022-08-03 23:50:42 -04:00
|
|
|
|
<h2>
|
2022-08-04 00:02:05 -04:00
|
|
|
|
Usage
|
2022-08-03 23:50:42 -04:00
|
|
|
|
</h2>
|
2022-08-04 00:02:05 -04:00
|
|
|
|
<p>
|
|
|
|
|
Basic usage is designed to be very simple, import the package and instantiate
|
|
|
|
|
a struct and you’re ready to go.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
For more extensive examples, see:
|
2022-08-04 17:22:49 -04:00
|
|
|
|
<a href="EXAMPLE.md" rel="nofollow">
|
2022-08-04 00:02:05 -04:00
|
|
|
|
EXAMPLE
|
|
|
|
|
</a>
|
|
|
|
|
</p>
|
|
|
|
|
<h3>
|
|
|
|
|
I2P(Garlic) Usage:
|
|
|
|
|
</h3>
|
|
|
|
|
<p>
|
|
|
|
|
When using it to manage an I2P session, set up an
|
|
|
|
|
<code>
|
|
|
|
|
onramp.Garlic
|
|
|
|
|
</code>
|
|
|
|
|
struct.
|
|
|
|
|
</p>
|
2022-08-04 17:47:46 -04:00
|
|
|
|
<pre><code>
|
|
|
|
|
package main
|
2022-08-03 23:47:24 -04:00
|
|
|
|
|
2022-08-04 17:45:21 -04:00
|
|
|
|
import (
|
|
|
|
|
"log"
|
2022-08-03 23:47:24 -04:00
|
|
|
|
|
2022-08-04 17:45:21 -04:00
|
|
|
|
"github.com/eyedeekay/onramp"
|
2022-08-03 23:47:24 -04:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
2022-08-04 17:45:21 -04:00
|
|
|
|
garlic := &onramp.Garlic{}
|
2022-08-03 23:47:24 -04:00
|
|
|
|
defer garlic.Close()
|
|
|
|
|
listener, err := garlic.Listen()
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|
defer listener.Close()
|
|
|
|
|
}
|
|
|
|
|
</code></pre>
|
2022-08-04 00:02:05 -04:00
|
|
|
|
<h3>
|
2022-08-03 23:50:42 -04:00
|
|
|
|
Tor(Onion) Usage:
|
2022-08-04 00:02:05 -04:00
|
|
|
|
</h3>
|
|
|
|
|
<p>
|
|
|
|
|
When using it to manage a Tor session, set up an
|
|
|
|
|
<code>
|
|
|
|
|
onramp.Onion
|
|
|
|
|
</code>
|
|
|
|
|
struct.
|
|
|
|
|
</p>
|
2022-08-04 17:47:46 -04:00
|
|
|
|
<pre><code>
|
|
|
|
|
package main
|
2022-08-03 23:47:24 -04:00
|
|
|
|
|
2022-08-04 17:45:21 -04:00
|
|
|
|
import (
|
|
|
|
|
"log"
|
2022-08-03 23:47:24 -04:00
|
|
|
|
|
2022-08-04 17:45:21 -04:00
|
|
|
|
"github.com/eyedeekay/onramp"
|
2022-08-03 23:47:24 -04:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
2022-08-04 17:45:21 -04:00
|
|
|
|
onion := &onramp.Onion{}
|
2022-08-03 23:47:24 -04:00
|
|
|
|
defer garlic.Close()
|
2022-08-03 23:50:42 -04:00
|
|
|
|
listener, err := onion.Listen()
|
2022-08-03 23:47:24 -04:00
|
|
|
|
if err != nil {
|
|
|
|
|
log.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|
defer listener.Close()
|
|
|
|
|
}
|
|
|
|
|
</code></pre>
|
2022-08-03 22:00:33 -04:00
|
|
|
|
<div>
|
|
|
|
|
<a href="#show">
|
|
|
|
|
Show license
|
|
|
|
|
</a>
|
|
|
|
|
<div id="show">
|
|
|
|
|
<div id="hide">
|
|
|
|
|
<pre><code>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.
|
|
|
|
|
</code></pre>
|
|
|
|
|
<a href="#hide">
|
|
|
|
|
Hide license
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<a href="https://geti2p.net/">
|
|
|
|
|
I2P
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|