{"id":64424,"library":"hsanjuan-go-libp2p-http","title":"go-libp2p-http","description":"Allows serving and making HTTP requests over libp2p using Go's standard http and net stacks.","status":"active","version":"0.5.0","language":"go","source_language":null,"source_url":"https://github.com/hsanjuan/go-libp2p-http","tags":["libp2p","http","p2p","networking","peer-to-peer"],"install":[{"cmd":"go get github.com/hsanjuan/go-libp2p-http","lang":"bash","label":"Install github.com/hsanjuan/go-libp2p-http"}],"dependencies":[],"imports":[{"symbol":"p2phttp","correct":"github.com/hsanjuan/go-libp2p-http"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"github.com/hsanjuan/go-libp2p-http\"\n)\n\nfunc main() {\n\thost, _ := libp2p.New()\n\tln, _ := p2phttp.Listen(host, \"/my-protocol\")\n\thttp.Serve(ln, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tfmt.Fprintln(w, \"Hello from libp2p!\")\n\t}))\n}","lang":"go","description":"Starts an HTTP server over libp2p."},"warnings":[{"fix":"Use separate hosts for client and server roles.","message":"libp2p hosts cannot dial themselves, so the same host cannot act as both server and client.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'allow':5 'go':2,14 'go-libp2p-http':1 'http':4,9,17,22 'libp2p':3,12,21 'make':8 'net':19 'network':24 'p2p':23 'peer':26,28 'peer-to-p':25 'request':10 'serv':6 'stack':20 'standard':16 'use':13","created_at":"2026-06-17T16:55:48.943277+00:00","updated_at":"2026-06-17T16:55:48.943277+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/hsanjuan/go-libp2p-http","github":"https://github.com/hsanjuan/go-libp2p-http","docs":"https://pkg.go.dev/github.com/hsanjuan/go-libp2p-http#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}