{"id":13711983,"url":"https://github.com/xiaoyao1991/manspreading","last_synced_at":"2025-04-10T12:12:33.319Z","repository":{"id":55053721,"uuid":"122938548","full_name":"xiaoyao1991/manspreading","owner":"xiaoyao1991","description":"Manspreading is a proxy server that helps you greedily occupy a peer seat in a remote geth node","archived":false,"fork":false,"pushed_at":"2018-03-03T03:10:12.000Z","size":8211,"stargazers_count":44,"open_issues_count":1,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T11:07:09.859Z","etag":null,"topics":["blockchain","ethereum","geth","go","golang","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiaoyao1991.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":"2018-02-26T08:33:46.000Z","updated_at":"2024-11-13T13:09:21.000Z","dependencies_parsed_at":"2022-08-14T10:20:10.335Z","dependency_job_id":null,"html_url":"https://github.com/xiaoyao1991/manspreading","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyao1991%2Fmanspreading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyao1991%2Fmanspreading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyao1991%2Fmanspreading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyao1991%2Fmanspreading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaoyao1991","download_url":"https://codeload.github.com/xiaoyao1991/manspreading/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217080,"owners_count":21066633,"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":["blockchain","ethereum","geth","go","golang","proxy"],"created_at":"2024-08-02T23:01:13.651Z","updated_at":"2025-04-10T12:12:33.287Z","avatar_url":"https://github.com/xiaoyao1991.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# Manspreading\nManspreading helps you greedily occupy a peer seat in a remote geth node. \n![seat-occupied](https://sicksack.com/bags/bag-0261.jpg)\n\n### Introduction\nSadly, due to the fact that many nodes on Ethereum network do not change the [default](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) `--maxpeers` settings, most nodes are full and won't accept new peers. \nAlthough there are `static-nodes.json` and `trusted-nodes.json` where a node owner can hardcode peers that will always connect regardless of the restriction by `--maxpeers`, these options are buried deep in the document and codebase, so that few knows they exist.\nPreserving a node peer seat at a peer becomes essential in the development/research on geth.  \n\nManspreading is a proxy server that can be run as daemon and occupies a \"seat\" at a remote geth peer, so the real geth instance behind the proxy can stop and restart anytime without worrying the seat at the remote peer been taken during the restart period.\n\n### Prerequisite\n- Golang (v1.8+)\n- You need to install [geth](https://github.com/ethereum/go-ethereum/) as the dependency by running `go get github.com/ethereum/go-ethereum`     \n\n### Usage\n1. `go build .`\n2. `./manspreading --upstream=\"\u003cremote node enode url\u003e\" --listenaddr=\"127.0.0.1:36666\"`  \n    A log line will show what's the enode url of the manspreading proxy in the format of `enode://\u003cnodekey\u003e@\u003clistenaddr\u003e`  \n    or if you have a nodekey file that you'd like to use:  \n    `./manspreading --upstream=\"\u003cremote node enode url\u003e\" --listenaddr=\"127.0.0.1:36666\" --nodekey=\"\u003cpath_to_your_nodekey\u003e\"`  \n    Upstream node will be configured as both a static node and a trusted node, therefore even if the upstream disconnect itself, manspreading will attempt to reconnect indefinitely.\n3. Start your real geth instance and add the manspreading enode url as a peer by running `admin.addPeer(\"\u003cmanspreading enode url\u003e\")`\n\n### TODO\n- Making manspreading a 1-to-many or even a many-to-many proxy","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoyao1991%2Fmanspreading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaoyao1991%2Fmanspreading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoyao1991%2Fmanspreading/lists"}