diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html new file mode 100644 index 0000000..460abeb --- /dev/null +++ b/index.html @@ -0,0 +1,291 @@ + +
+
+ In the next version, I’ll be moving the
+
+ i2pkeys
+
+ directory to it’s own repository
+ so I can avoid import cycle headaches. Please migrate to the new
+
+ i2pkeys
+
+ repository
+ 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' {} \;
+
+ + go library for the I2P + + SAMv3.0 + + bridge, used to build anonymous/pseudonymous end-to-end encrypted sockets. +
++ This library is much better than ccondom (that use BOB), much more stable and much easier to maintain. +
++ + What works: + +
++ + Does not work: + +
+
+ godoc -http=:8081
+
+ into your terminal and hit enter.
+ package main
+
+import (
+ "github.com/eyedeekay/sam3"
+ "github.com/eyedeekay/sam3/i2pkeys"
+ "fmt"
+)
+
+const yoursam = "127.0.0.1:7656" // sam bridge
+
+func client(server i2pkeys.I2PAddr) {
+ sam, _ := sam3.NewSAM(yoursam)
+ keys, _ := sam.NewKeys()
+ stream, _ := sam.NewStreamSession("clientTun", keys, sam3.Options_Small)
+ fmt.Println("Client: Connecting to " + server.Base32())
+ conn, _ := stream.DialI2P(server)
+ conn.Write([]byte("Hello world!"))
+ return
+}
+
+func main() {
+ sam, _ := NewSAM(yoursam)
+ keys, _ := sam.NewKeys()
+ stream, _ := sam.NewStreamSession("serverTun", keys, sam3.Options_Medium)
+ listener, _ := stream.Listen()
+ go client(keys.Addr())
+ conn, _ := listener.Accept()
+ buf := make([]byte, 4096)
+ n, _ := conn.Read(buf)
+ fmt.Println("Server received: " + string(buf[:n]))
+}
+
+ + The above will write to the terminal: +
+Client: Connecting to zjnvfh4hs3et5vtz35ogwzrws26zvwkcad5uo5esecvg4qpk5b4a.b32.i2p
+Server received: Hello world!
+
+ + Error handling was omitted in the above code for readability. +
+
+ go test -tags=nettest
+
+ runs the whole suite (takes 90+ sec to perform!)
+
+ go test -short
+
+ runs the shorter variant, does not connect to anything
+ + Public domain. +
+
+ kalle.vedin@fripost.org
+
+ This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+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 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.
+
+For more information, please refer to
+
+
+ Hide license
+
+