Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
197aca0ece | ||
![]() |
fff37dbffa | ||
![]() |
dfd7cd886f | ||
![]() |
c998e57a89 | ||
![]() |
41317685c5 |
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
USER_GH=eyedeekay
|
USER_GH=eyedeekay
|
||||||
VERSION=0.33.4
|
VERSION=0.33.5
|
||||||
packagename=sam3
|
packagename=sam3
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
|
@@ -10,6 +10,8 @@ before upgrading your sam3 dependencies. You can probably do this by running:
|
|||||||
find . -name '*.go' -exec sed -i 's|github.com/eyedeekay/sam3/i2pkeys|github.com/eyedeekay/i2pkeys|g' {} \;
|
find . -name '*.go' -exec sed -i 's|github.com/eyedeekay/sam3/i2pkeys|github.com/eyedeekay/i2pkeys|g' {} \;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
STATUS: This project is maintained. I will respond to issues, pull requests, and feature requests within a few days.
|
||||||
|
|
||||||
# README #
|
# README #
|
||||||
|
|
||||||
go library for the I2P [SAMv3.0](https://geti2p.net/en/docs/api/samv3) bridge, used to build anonymous/pseudonymous end-to-end encrypted sockets.
|
go library for the I2P [SAMv3.0](https://geti2p.net/en/docs/api/samv3) bridge, used to build anonymous/pseudonymous end-to-end encrypted sockets.
|
||||||
|
55
index.html
55
index.html
@@ -7,6 +7,7 @@
|
|||||||
<meta name="description" content="sam3" />
|
<meta name="description" content="sam3" />
|
||||||
<meta name="keywords" content="master" />
|
<meta name="keywords" content="master" />
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
@@ -30,19 +31,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h1>
|
<h1>
|
||||||
<a href="/">
|
<a href="#readme" rel="nofollow">
|
||||||
README
|
<span></span>
|
||||||
</a>
|
</a>
|
||||||
|
README
|
||||||
</h1>
|
</h1>
|
||||||
<h2>
|
<h2>
|
||||||
|
<a href="#important" rel="nofollow">
|
||||||
|
<span></span>
|
||||||
|
</a>
|
||||||
!!IMPORTANT!!
|
!!IMPORTANT!!
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
In the next version, I’ll be moving the
|
In the next version, I'll be moving the
|
||||||
<code>
|
<code>
|
||||||
i2pkeys
|
i2pkeys
|
||||||
</code>
|
</code>
|
||||||
directory to it’s own repository
|
directory to it's own repository
|
||||||
so I can avoid import cycle headaches. Please migrate to the new
|
so I can avoid import cycle headaches. Please migrate to the new
|
||||||
<code>
|
<code>
|
||||||
i2pkeys
|
i2pkeys
|
||||||
@@ -50,9 +55,17 @@
|
|||||||
repository
|
repository
|
||||||
before upgrading your sam3 dependencies. You can probably do this by running:
|
before upgrading your sam3 dependencies. You can probably do this by running:
|
||||||
</p>
|
</p>
|
||||||
<pre><code>find . -name '*.go' -exec sed -i 's|github.com/eyedeekay/sam3/i2pkeys|github.com/eyedeekay/i2pkeys|g' {} \;
|
<div>
|
||||||
</code></pre>
|
<pre>find . -name '*.go' -exec sed -i 's|github.com/eyedeekay/sam3/i2pkeys|github.com/eyedeekay/i2pkeys|g' {} \;
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
STATUS: This project is maintained. I will respond to issues, pull requests, and feature requests within a few days.
|
||||||
|
</p>
|
||||||
<h1>
|
<h1>
|
||||||
|
<a href="#readme" rel="nofollow">
|
||||||
|
<span></span>
|
||||||
|
</a>
|
||||||
README
|
README
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
@@ -66,6 +79,9 @@
|
|||||||
This library is much better than ccondom (that use BOB), much more stable and much easier to maintain.
|
This library is much better than ccondom (that use BOB), much more stable and much easier to maintain.
|
||||||
</p>
|
</p>
|
||||||
<h2>
|
<h2>
|
||||||
|
<a href="#support-todo" rel="nofollow">
|
||||||
|
<span></span>
|
||||||
|
</a>
|
||||||
Support/TODO
|
Support/TODO
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
@@ -133,6 +149,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>
|
<h2>
|
||||||
|
<a href="#documentation" rel="nofollow">
|
||||||
|
<span></span>
|
||||||
|
</a>
|
||||||
Documentation
|
Documentation
|
||||||
</h2>
|
</h2>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -160,9 +179,13 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>
|
<h2>
|
||||||
|
<a href="#examples" rel="nofollow">
|
||||||
|
<span></span>
|
||||||
|
</a>
|
||||||
Examples
|
Examples
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code>package main
|
<div>
|
||||||
|
<pre>package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/eyedeekay/sam3"
|
"github.com/eyedeekay/sam3"
|
||||||
@@ -193,17 +216,23 @@ func main() {
|
|||||||
n, _ := conn.Read(buf)
|
n, _ := conn.Read(buf)
|
||||||
fmt.Println("Server received: " + string(buf[:n]))
|
fmt.Println("Server received: " + string(buf[:n]))
|
||||||
}
|
}
|
||||||
</code></pre>
|
</pre>
|
||||||
|
</div>
|
||||||
<p>
|
<p>
|
||||||
The above will write to the terminal:
|
The above will write to the terminal:
|
||||||
</p>
|
</p>
|
||||||
<pre><code>Client: Connecting to zjnvfh4hs3et5vtz35ogwzrws26zvwkcad5uo5esecvg4qpk5b4a.b32.i2p
|
<div>
|
||||||
|
<pre>Client: Connecting to zjnvfh4hs3et5vtz35ogwzrws26zvwkcad5uo5esecvg4qpk5b4a.b32.i2p
|
||||||
Server received: Hello world!
|
Server received: Hello world!
|
||||||
</code></pre>
|
</pre>
|
||||||
|
</div>
|
||||||
<p>
|
<p>
|
||||||
Error handling was omitted in the above code for readability.
|
Error handling was omitted in the above code for readability.
|
||||||
</p>
|
</p>
|
||||||
<h2>
|
<h2>
|
||||||
|
<a href="#testing" rel="nofollow">
|
||||||
|
<span></span>
|
||||||
|
</a>
|
||||||
Testing
|
Testing
|
||||||
</h2>
|
</h2>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -221,12 +250,18 @@ Server received: Hello world!
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>
|
<h2>
|
||||||
|
<a href="#license" rel="nofollow">
|
||||||
|
<span></span>
|
||||||
|
</a>
|
||||||
License
|
License
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
Public domain.
|
Public domain.
|
||||||
</p>
|
</p>
|
||||||
<h2>
|
<h2>
|
||||||
|
<a href="#author" rel="nofollow">
|
||||||
|
<span></span>
|
||||||
|
</a>
|
||||||
Author
|
Author
|
||||||
</h2>
|
</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
2
sam3.go
2
sam3.go
@@ -35,7 +35,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Sig_NONE = ""
|
Sig_NONE = "SIGNATURE_TYPE=EdDSA_SHA512_Ed25519"
|
||||||
Sig_DSA_SHA1 = "SIGNATURE_TYPE=DSA_SHA1"
|
Sig_DSA_SHA1 = "SIGNATURE_TYPE=DSA_SHA1"
|
||||||
Sig_ECDSA_SHA256_P256 = "SIGNATURE_TYPE=ECDSA_SHA256_P256"
|
Sig_ECDSA_SHA256_P256 = "SIGNATURE_TYPE=ECDSA_SHA256_P256"
|
||||||
Sig_ECDSA_SHA384_P384 = "SIGNATURE_TYPE=ECDSA_SHA384_P384"
|
Sig_ECDSA_SHA384_P384 = "SIGNATURE_TYPE=ECDSA_SHA384_P384"
|
||||||
|
10
showhider.css
Normal file
10
showhider.css
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/* edgar showhider CSS file */
|
||||||
|
#show {display:none; }
|
||||||
|
#hide {display:block; }
|
||||||
|
#show:target {display: block; }
|
||||||
|
#hide:target {display: none; }
|
||||||
|
|
||||||
|
#shownav {display:none; }
|
||||||
|
#hidenav {display:block; }
|
||||||
|
#shownav:target {display: block; }
|
||||||
|
#hidenav:target {display: none; }
|
@@ -161,6 +161,7 @@ func minNonzeroTime(a, b time.Time) time.Time {
|
|||||||
// - now+Timeout
|
// - now+Timeout
|
||||||
// - d.Deadline
|
// - d.Deadline
|
||||||
// - the context's deadline
|
// - the context's deadline
|
||||||
|
//
|
||||||
// Or zero, if none of Timeout, Deadline, or context's deadline is set.
|
// Or zero, if none of Timeout, Deadline, or context's deadline is set.
|
||||||
func (s *StreamSession) deadline(ctx context.Context, now time.Time) (earliest time.Time) {
|
func (s *StreamSession) deadline(ctx context.Context, now time.Time) (earliest time.Time) {
|
||||||
if s.Timeout != 0 { // including negative, for historical reasons
|
if s.Timeout != 0 { // including negative, for historical reasons
|
||||||
|
Reference in New Issue
Block a user