{"id":15163349,"url":"https://github.com/openiothub/gateway-go","last_synced_at":"2025-04-04T19:14:07.803Z","repository":{"id":57513021,"uuid":"238195156","full_name":"OpenIoTHub/gateway-go","owner":"OpenIoTHub","description":"🎁GateWay Client for OpenIoTHub[云亿连/云易连访问内网端口和设备的网关]","archived":false,"fork":false,"pushed_at":"2025-03-10T13:31:27.000Z","size":7012,"stargazers_count":145,"open_issues_count":1,"forks_count":36,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-04T19:13:52.641Z","etag":null,"topics":["arduino","client","esp32","esp8266","frp","frpc","frps","gateway","golang","goreleaser","iot","iothub","iothub-platform","nat","nps","open","openiothub","openwrt","socks","tunnel"],"latest_commit_sha":null,"homepage":"http://github.com/OpenIoTHub","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/OpenIoTHub.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}},"created_at":"2020-02-04T11:58:28.000Z","updated_at":"2025-03-10T13:13:52.000Z","dependencies_parsed_at":"2023-12-27T17:28:10.749Z","dependency_job_id":"1469ca0f-5f9b-4eb4-b8f7-95347bab3d5f","html_url":"https://github.com/OpenIoTHub/gateway-go","commit_stats":{"total_commits":368,"total_committers":5,"mean_commits":73.6,"dds":"0.38315217391304346","last_synced_commit":"d34d4272b7a344d4da8e0cf4737ed4d48ada2fdf"},"previous_names":[],"tags_count":124,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenIoTHub%2Fgateway-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenIoTHub%2Fgateway-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenIoTHub%2Fgateway-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenIoTHub%2Fgateway-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenIoTHub","download_url":"https://codeload.github.com/OpenIoTHub/gateway-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234923,"owners_count":20905854,"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":["arduino","client","esp32","esp8266","frp","frpc","frps","gateway","golang","goreleaser","iot","iothub","iothub-platform","nat","nps","open","openiothub","openwrt","socks","tunnel"],"created_at":"2024-09-27T02:23:45.674Z","updated_at":"2025-04-04T19:14:07.781Z","avatar_url":"https://github.com/OpenIoTHub.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gateway-go\n[![Build Status](https://travis-ci.com/OpenIoTHub/gateway-go.svg?branch=master)](https://travis-ci.com/OpenIoTHub/gateway-go)\n\n[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/gateway-go)\n\n[中文文档](https://docs.iothub.cloud/gateway/index.html)\n\nYou can install the pre-compiled binary (in several different ways),\nuse Docker.\n\nHere are the steps for each of them:\n## NAS Install\n\n#### [synology](https://www.synology.com)\nCurrently, you can [install it using Docker](https://www.bilibili.com/video/BV1of4y1G7Jb)\n#### [CasaOS](https://www.casaos.io)、[ZimaOS](https://www.zimaspace.com)\nDownload directly from the app market [gateway-go](https://github.com/IceWhaleTech/CasaOS-AppStore/tree/main/Apps/Gateway-go)\n#### [fnos](https://www.fnnas.com)\nCurrently, you can [install it using Docker](#running-with-docker)\n#### [unRaid](https://unraid.net)\nCurrently, you can [install it using Docker](https://www.bilibili.com/video/BV1EzWFeSEGC)\n#### [QNAP](https://www.qnap.com.cn/zh-cn)\nCurrently, you can [install it using Docker](#running-with-docker)\n#### [ugnas](https://www.ugnas.com)\nCurrently, you can [install it using Docker](#running-with-docker)\n#### [zspace](https://www.zspace.cn)\nCurrently, you can [install it using Docker](#running-with-docker)\n## Router Install\n\n#### [openwrt/entware/optware](https://openwrt.org/)\n```sh\nopkg update\nopkg install gateway-go\n```\n#### use snapshot branch：https://downloads.openwrt.org/snapshots/ to get the latest version\n\n## Install the pre-compiled binary\n\n**one script** :\n```sh\ncurl -fsSL https://get.iothub.cloud | sudo bash\n```\n\n**homebrew** (may not be the latest version):\n\n```sh\n$ brew install gateway-go\n```\nhomebrew pr [gateway-go](https://github.com/Homebrew/homebrew-core/blob/master/Formula/gateway-go.rb)\n\u003econfig file :\n\u003e```text\n\u003e /usr/local/etc/gateway-go/gateway-go.yaml\n\u003e```\n\n\n**snapcraft**:\n\n```sh\n$ sudo snap install gateway-go\n```\n\u003econfig file :\n\u003e```text\n\u003e /root/snap/gateway-go/current/gateway-go.yaml\n\u003e```\n\n\n**scoop**:\n\n```sh\n$ scoop bucket add OpenIoTHub https://github.com/OpenIoTHub/scoop-bucket.git\n$ scoop install gateway-go\n```\n\n**deb/rpm**:\n\nDownload the `.deb` or `.rpm` from the [releases page][releases] and\ninstall with `dpkg -i` and `rpm -i` respectively.  \n\u003econfig file :\n\u003e```text\n\u003e /etc/gateway-go/gateway-go.yaml\n\u003e```\n\n**manually**:\n\nDownload the pre-compiled binaries from the [releases page][releases] and\ncopy to the desired location.\n\n## Running with Docker\n\nYou can also use it within a Docker container. To do that, you'll need to\nexecute something more-or-less like the following:\n\n```sh\n$ docker run -it --net=host openiothub/gateway-go:latest -t \u003cyour Token\u003e\n```\n\nNote that the image will almost always have the last stable Go version.\n\n[releases]: https://github.com/OpenIoTHub/gateway-go/releases\n## Build dynamic/static Library\n```shell\n#build and push mobile lib\n#install gomobile(at system cli)\ngo install golang.org/x/mobile/cmd/gobind@latest\ngo install golang.org/x/mobile/cmd/gomobile@latest\ngomobile init\ngomobile version\ngo get -u golang.org/x/mobile/...\n#\nexport GO111MODULE=\"off\"\ngomobile bind -target=android  -o gateway.aar\ngomobile bind -ldflags '-w -s -extldflags \"-lresolve\"' --target=ios,macos,iossimulator -o OpenIoTHubGateway.xcframework ./client\n#\n#https://gitee.com/OpenIoThub/mobile-lib-podspec\n#git tag -a 0.0.1 -m '0.0.1'\n#git pus --tags\n#pod trunk push ./OpenIoTHubGateway.podspec --skip-import-validation --allow-warnings\n#\nmvn gpg:sign-and-deploy-file -DrepositoryId=ossrh -Dfile=gateway.aar -DpomFile=gateway.pom -Durl=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/\nmvn deploy:deploy-file -Dfile=client.aar -DgroupId=cloud.iothub -DartifactId=gateway -Dversion=0.0.1 -Dpackaging=aar -DrepositoryId=github -Durl=https://maven.pkg.github.com/OpenIoTHub/gateway-go\n```\n```shell\n#for build windows dll\necho \"building windows dll\"\n#brew install mingw-w64\n#sudo apt-get install binutils-mingw-w64\n# shellcheck disable=SC2034\nexport CGO_ENABLED=1\nexport CC=x86_64-w64-mingw32-gcc\nexport CXX=x86_64-w64-mingw32-g++\nexport GOOS=windows GOARCH=amd64\ngo build -tags windows -ldflags=-w -trimpath -o ./build/windows/gateway_amd64.dll -buildmode=c-shared main.go\n```\n```shell\n#for build linux/android so file\necho \"building linux/android so file\"\n#linux和Android共用动态链接库\nexport CGO_ENABLED=1\nexport GOARCH=amd64\nexport GOOS=linux\ngo build -tags linux -ldflags=-w -trimpath -o build/linux/libgateway_amd64.so -buildmode c-shared main.go\n# shellcheck disable=SC2034\nexport CGO_ENABLED=1\nexport GOARCH=arm64\nexport GOOS=linux\n#sudo apt install gcc-aarch64-linux-gnu\nexport CC=aarch64-linux-gnu-gcc\n##sudo apt install g++-aarch64-linux-gnu\n#export CXX=aarch64-linux-gnu-g++\n##sudo apt-get install binutils-aarch64-linux-gnu\n#export AR=aarch64-linux-gnu-ar\ngo build -tags linux -ldflags=-w -trimpath -o build/linux/libgateway_arm64.so -buildmode c-shared main.go\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeniothub%2Fgateway-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopeniothub%2Fgateway-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeniothub%2Fgateway-go/lists"}