From 6848baecced4d8f4820b354449b25351ff55dbae Mon Sep 17 00:00:00 2001 From: idk Date: Fri, 18 Nov 2022 00:05:17 -0500 Subject: [PATCH] update index.html --- index.html | 119 ++++++++++++++++++++++++-------------------------- showhider.css | 5 +++ style.css | 10 ++++- 3 files changed, 71 insertions(+), 63 deletions(-) diff --git a/index.html b/index.html index 704b86c..c0ef479 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,11 @@
+ + / +

- - - goSam

A go library for using the - + I2P Simple Anonymous Messaging ( - + SAM version 3.0 ) bridge. It @@ -58,17 +63,11 @@ STATUS: This project is maintained. I will respond to issues, pull requests, and feature requests within a few days. I am primarily maintaining functionality. This is widely used and easy to use, but thusfar, mostly by me. It sees a lot of testing and no breaking changes to the API are expected.

- - - Installation

go get github.com/eyedeekay/goSam
 

- - - Using it for HTTP Transport

@@ -79,18 +78,17 @@ net.Dial - so you can use go's library packages like http. + so you can use go’s library packages like http.

-
-
package main
+    
package main
 
 import (
-	"io"
-	"log"
-	"net/http"
-	"os"
+	"io"
+	"log"
+	"net/http"
+	"os"
 
-	"github.com/cryptix/goSam"
+	"github.com/cryptix/goSam"
 )
 
 func main() {
@@ -98,7 +96,7 @@ func main() {
 	sam, err := goSam.NewDefaultClient()
 	checkErr(err)
 
-	log.Println("Client Created")
+	log.Println("Client Created")
 
 	// create a transport that uses SAM to dial TCP Connections
 	tr := &http.Transport{
@@ -109,14 +107,14 @@ func main() {
 	client := &http.Client{Transport: tr}
 
 	// send a get request
-	resp, err := client.Get("http://stats.i2p/")
+	resp, err := client.Get("http://stats.i2p/")
 	checkErr(err)
 	defer resp.Body.Close()
 
-	log.Printf("Get returned %+v\n", resp)
+	log.Printf("Get returned %+v\n", resp)
 
 	// create a file for the response
-	file, err := os.Create("stats.html")
+	file, err := os.Create("stats.html")
 	checkErr(err)
 	defer file.Close()
 
@@ -124,7 +122,7 @@ func main() {
 	_, err = io.Copy(file, resp.Body)
 	checkErr(err)
 
-	log.Println("Done.")
+	log.Println("Done.")
 }
 
 func checkErr(err error) {
@@ -133,34 +131,29 @@ func checkErr(err error) {
 	}
 }
 
-
-
+

- - - Using SAM by default, as a proxy for all HTTP Clients used by a Go application

This will make the SAM transport dialer the default for all HTTP clients.

-
-
package main
+    
package main
 
 import (
-	"io"
-	"log"
-	"net/http"
-	"os"
+	"io"
+	"log"
+	"net/http"
+	"os"
 
-	"github.com/cryptix/goSam"
+	"github.com/cryptix/goSam"
 )
 
 func main() {
 	sam, err := goSam.NewDefaultClient()
 	checkErr(err)
 
-	log.Println("Client Created")
+	log.Println("Client Created")
 
 	// create a transport that uses SAM to dial TCP Connections
 	httpClient := &http.Client{
@@ -178,12 +171,8 @@ func checkErr(err error) {
 		log.Fatal(err)
 	}
 }
-
-
+

- - - Using it as a SOCKS proxy

@@ -191,7 +180,7 @@ func checkErr(err error) { client also implements a resolver compatible with - + getlantern/go-socks5 @@ -199,20 +188,19 @@ func checkErr(err error) { , making it very easy to implement a SOCKS5 server.

-
-
package main
+    
package main
 
 import (
-  "flag"
+  "flag"
 
-	"github.com/eyedeekay/goSam"
-	"github.com/getlantern/go-socks5"
-	"log"
+	"github.com/eyedeekay/goSam"
+	"github.com/getlantern/go-socks5"
+	"log"
 )
 
 var (
-  samaddr = flag.String("sam", "127.0.0.1:7656", "SAM API address to use")
-  socksaddr = flag.String("socks", "127.0.0.1:7675", "SOCKS address to use")
+  samaddr = flag.String("sam", "127.0.0.1:7656", "SAM API address to use")
+  socksaddr = flag.String("socks", "127.0.0.1:7675", "SOCKS address to use")
 )
 
 func main() {
@@ -220,7 +208,7 @@ func main() {
 	if err != nil {
 		panic(err)
 	}
-	log.Println("Client Created")
+	log.Println("Client Created")
 
 	// create a transport that uses SAM to dial TCP Connections
 	conf := &socks5.Config{
@@ -233,16 +221,12 @@ func main() {
 	}
 
 	// Create SOCKS5 proxy on localhost port 8000
-	if err := server.ListenAndServe("tcp", *socksaddr); err != nil {
+	if err := server.ListenAndServe("tcp", *socksaddr); err != nil {
 		panic(err)
 	}
 }
-
-
+

- - - .deb package

@@ -259,13 +243,10 @@ func main() {

    debuild -S
 

- will produce a viable source package for use with Launchpad PPA's and other + will produce a viable source package for use with Launchpad PPA’s and other similar systems.

- - - TODO

+
+ + + Get the source code: + + + +
Show license diff --git a/showhider.css b/showhider.css index c5ec96e..cea9ba7 100644 --- a/showhider.css +++ b/showhider.css @@ -8,3 +8,8 @@ #hidenav {display:block; } #shownav:target {display: block; } #hidenav:target {display: none; } + +#donate {display:none; } +#hidedonate {display:block; } +#donate:target {display: block; } +#hidedonate:target {display: none; } diff --git a/style.css b/style.css index 83a9810..748f998 100644 --- a/style.css +++ b/style.css @@ -36,6 +36,7 @@ img { left: 5%; max-width: 60%; display: inline; + padding-right: 2%; } .inline { @@ -153,5 +154,12 @@ input { #navbar { float: right; - width: 10%; + width: 15%; +} +#returnhome { + font-size: xxx-large; + display: inline; +} +h1 { + display: inline; }