{"id":16085836,"url":"https://github.com/tzmax/apple-gotun2socks-library","last_synced_at":"2025-07-27T14:08:08.774Z","repository":{"id":143386175,"uuid":"592497770","full_name":"tzmax/apple-gotun2socks-library","owner":"tzmax","description":"gotun2socks library for macos and ios","archived":false,"fork":false,"pushed_at":"2023-02-25T01:45:21.000Z","size":21,"stargazers_count":7,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T12:52:10.671Z","etag":null,"topics":["gotun2socks","ios","library","macos","objective-c","swift","tun2socks"],"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/tzmax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2023-01-23T21:18:07.000Z","updated_at":"2024-12-20T16:34:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"16e97970-4a25-47dd-849b-60f48f0632cc","html_url":"https://github.com/tzmax/apple-gotun2socks-library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tzmax/apple-gotun2socks-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmax%2Fapple-gotun2socks-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmax%2Fapple-gotun2socks-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmax%2Fapple-gotun2socks-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmax%2Fapple-gotun2socks-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzmax","download_url":"https://codeload.github.com/tzmax/apple-gotun2socks-library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmax%2Fapple-gotun2socks-library/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267368932,"owners_count":24076093,"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-07-27T02:00:11.917Z","response_time":82,"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":["gotun2socks","ios","library","macos","objective-c","swift","tun2socks"],"created_at":"2024-10-09T13:09:32.173Z","updated_at":"2025-07-27T14:08:08.755Z","avatar_url":"https://github.com/tzmax.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apple-gotun2socks-library\n\nGo package for building [go-tun2socks](https://github.com/eycorsican/go-tun2socks) library for macOS and iOS\n\n## Prerequisites\n\n- macOS host (iOS, macOS)\n- make\n- Go \u003e= 1.18\n- A C compiler (e.g.: clang, gcc)\n\n## Apple (iOS and macOS)\n\n### Set up\n\n- Xcode\n- [gomobile](https://pkg.go.dev/golang.org/x/mobile/cmd/gobind) (installed as needed by `make`)\n\n### Build\n```\nmake clean \u0026\u0026 make apple\n```\nThis will create `build/apple/Tun2socks.xcframework`.\n\n## API\n```\n#import \u003cTun2socks/Tun2socks.h\u003e\n\nNSString* tunAddr = @\"10.0.0.0\";\nNSString* tunWg = @\"10.0.0.1\";\nNSString* tunMask = @\"255.255.255.0\";\nNSString* tunDns = @\"8.8.8.8,8.8.4.4,1.1.1.1\";\nNSString* proxyServer = @\"socks5://127.0.0.1:1080\";\n\n// `tunAddr` TUN address.\n// `tunWg` TUN Gateway address.\n// `tunMask` TUN Masking.\n// `tunDns` TUN DNS address.\n// `socks5Proxy` socks5 proxy link.\n// `isUDPEnabled` indicates whether the tunnel and/or network enable UDP proxying.\n\nNSError* err;\nTun2socksTun2socksCtl* ctl = Tun2socksCreateTunConnect(tunAddr, tunWg, tunMask, tunDns, socks5ProxyLink, true, \u0026err);\nif (err != NULL) {\n    NSLog(@\"Tun2socksConnect error:  %@\\n\", err);\n}\n\nNSLog(@\"tun fd is %@ \\n\", ctl.tunName);\n```\n\n## Contribute\n\nPlease refer to the [contribution guide](/CONTRIBUTING.md)\n\n## Support\n\nV2RayXS: GUI for xray-core on macOS [tzmax/V2RayXS](https://github.com/tzmax/V2RayXS)\n\n## Thanks\n\n[eycorsican/go-tun2socks](https://github.com/eycorsican/go-tun2socks)\n\n[songgao/water](https://github.com/songgao/water)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzmax%2Fapple-gotun2socks-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzmax%2Fapple-gotun2socks-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzmax%2Fapple-gotun2socks-library/lists"}