{"id":17184595,"url":"https://github.com/josexy/netstackgo","last_synced_at":"2025-08-02T13:09:21.320Z","repository":{"id":147937876,"uuid":"619143482","full_name":"josexy/netstackgo","owner":"josexy","description":"An easy-to-use netstack, wrapped by gvisor and wireguard-go, which supports macOS/Linux/Windows.","archived":false,"fork":false,"pushed_at":"2024-06-24T11:52:51.000Z","size":67,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-07T06:37:26.217Z","etag":null,"topics":["golang","gvisor","netstack","tun"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josexy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-26T12:00:15.000Z","updated_at":"2025-01-07T23:11:33.000Z","dependencies_parsed_at":"2024-04-11T02:48:01.454Z","dependency_job_id":"599c0f65-878d-40e1-9d81-dda370bacce3","html_url":"https://github.com/josexy/netstackgo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/josexy/netstackgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josexy%2Fnetstackgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josexy%2Fnetstackgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josexy%2Fnetstackgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josexy%2Fnetstackgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josexy","download_url":"https://codeload.github.com/josexy/netstackgo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josexy%2Fnetstackgo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268393925,"owners_count":24243315,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golang","gvisor","netstack","tun"],"created_at":"2024-10-15T00:43:43.711Z","updated_at":"2025-08-02T13:09:21.297Z","avatar_url":"https://github.com/josexy.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# netstackgo\n\n\u003e ⚠️ **Deprecated: This project is no longer maintained.**\n\u003e \n\u003e Please use https://github.com/josexy/cropstun instead.\n\nAn easy-to-use netstack, wrapped by gvisor and wireguard-go, which supports macOS/Linux/Windows.\n\n```shell\ngo get github.com/josexy/netstackgo\n```\n\n# usage\n\n```go\ntype myHandler struct{}\n\nfunc (*myHandler) HandleTCPConn(info *netstackgo.ConnTuple, conn net.Conn) {\n\tlog.Printf(\"tcp, src: %s, dst: %s\", info.Src(), info.Dst())\n\t// do something...\n}\nfunc (*myHandler) HandleUDPConn(info *netstackgo.ConnTuple, conn net.PacketConn) {\n\tlog.Printf(\"udp, src: %s, dst: %s\", info.Src(), info.Dst())\n\t// do something...\n}\n\nfunc main() {\n\tnt := netstackgo.New(tun.TunConfig{\n\t\tName: \"tun2\",\n\t\tAddr: \"192.18.0.1/16\",\n\t\tMTU:  tun.DefaultMTU,\n\t})\n\tif err := nt.Start(); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer nt.Close()\n\tnt.RegisterConnHandler(\u0026myHandler{})\n\tinterrupt := make(chan os.Signal, 1)\n\tsignal.Notify(interrupt, syscall.SIGINT)\n\t\u003c-interrupt\n}\n```\n\nPS: Windows user requires downloading wintun.dll from https://www.wintun.net\n\n# credits\n\n- [clash](https://github.com/Dreamacro/clash)\n- [tun2socks](https://github.com/xjasonlyu/tun2socks)\n- [gvisor](https://github.com/google/gvisor)\n- [wireguard-go](https://git.zx2c4.com/wireguard-go)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosexy%2Fnetstackgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosexy%2Fnetstackgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosexy%2Fnetstackgo/lists"}