{"id":13739179,"url":"https://github.com/cryptix/goSam","last_synced_at":"2025-05-08T18:32:01.910Z","repository":{"id":13966511,"uuid":"16667031","full_name":"cryptix/goSam","owner":"cryptix","description":"A go library for using the I2P Simple Anonymous Messaging (SAM version 3.0) bridge","archived":false,"fork":false,"pushed_at":"2019-12-23T11:08:48.000Z","size":40,"stargazers_count":41,"open_issues_count":2,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-20T00:51:53.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryptix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-09T13:40:28.000Z","updated_at":"2025-01-16T22:24:11.000Z","dependencies_parsed_at":"2022-08-30T01:50:32.057Z","dependency_job_id":null,"html_url":"https://github.com/cryptix/goSam","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptix%2FgoSam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptix%2FgoSam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptix%2FgoSam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptix%2FgoSam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryptix","download_url":"https://codeload.github.com/cryptix/goSam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253127129,"owners_count":21858196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T04:00:27.527Z","updated_at":"2025-05-08T18:32:01.609Z","avatar_url":"https://github.com/cryptix.png","language":"Go","funding_links":[],"categories":["Libraries"],"sub_categories":["SAM"],"readme":"goSam\n=====\n\nA go library for using the [I2P](https://geti2p.net/en/) Simple Anonymous Messaging ([SAM version 3.0](https://geti2p.net/en/docs/api/samv3)) bridge\n\nThis is in an **early development stage**. I would love to hear about any issues or ideas for improvement.\n\n## Installation\n```\ngo get github.com/cryptix/goSam\n```\n\n## Using it for HTTP Transport\n\nI implemented `Client.Dial` like `net.Dial` so you can use go's library packages like http.\n\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/cryptix/goSam\"\n)\n\nfunc main() {\n\t// create a default sam client\n\tsam, err := goSam.NewDefaultClient()\n\tcheckErr(err)\n\n\tlog.Println(\"Client Created\")\n\n\t// create a transport that uses SAM to dial TCP Connections\n\ttr := \u0026http.Transport{\n\t\tDial: sam.Dial,\n\t}\n\n\t// create  a client using this transport\n\tclient := \u0026http.Client{Transport: tr}\n\n\t// send a get request\n\tresp, err := client.Get(\"http://stats.i2p/\")\n\tcheckErr(err)\n\tdefer resp.Body.Close()\n\n\tlog.Printf(\"Get returned %+v\\n\", resp)\n\n\t// create a file for the response\n\tfile, err := os.Create(\"stats.html\")\n\tcheckErr(err)\n\tdefer file.Close()\n\n\t// copy the response to the file\n\t_, err = io.Copy(file, resp.Body)\n\tcheckErr(err)\n\n\tlog.Println(\"Done.\")\n}\n\nfunc checkErr(err error) {\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\n### TODO\n\n* Implement `STREAM ACCEPT` and `STREAM FORWARD`\n* Implement datagrams (Repliable and Anon)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptix%2FgoSam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptix%2FgoSam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptix%2FgoSam/lists"}