{"id":14971051,"url":"https://github.com/openiothub/server-go","last_synced_at":"2025-04-09T23:18:21.305Z","repository":{"id":50733417,"uuid":"178142034","full_name":"OpenIoTHub/server-go","owner":"OpenIoTHub","description":"🎨OpenIoTHub Server[内网穿透和物联网设备管理服务器]","archived":false,"fork":false,"pushed_at":"2024-08-24T15:07:32.000Z","size":18377,"stargazers_count":162,"open_issues_count":1,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T23:18:05.476Z","etag":null,"topics":["arduino","esp32","esp8266","frp","go","golang","goreleaser","iot","iothub","mux","nat","nps","open","openiothub","server","tunnel","tunnel-server"],"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/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":"2019-03-28T06:39:34.000Z","updated_at":"2025-04-06T01:48:28.000Z","dependencies_parsed_at":"2022-09-03T08:20:21.688Z","dependency_job_id":"96ed1380-3fd1-4ef3-b19c-a7c7d873f517","html_url":"https://github.com/OpenIoTHub/server-go","commit_stats":{"total_commits":205,"total_committers":3,"mean_commits":68.33333333333333,"dds":"0.48292682926829267","last_synced_commit":"f7310370514b5b8af3deb750636cb526532488e5"},"previous_names":[],"tags_count":90,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenIoTHub%2Fserver-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenIoTHub%2Fserver-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenIoTHub%2Fserver-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenIoTHub%2Fserver-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenIoTHub","download_url":"https://codeload.github.com/OpenIoTHub/server-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125593,"owners_count":21051771,"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","esp32","esp8266","frp","go","golang","goreleaser","iot","iothub","mux","nat","nps","open","openiothub","server","tunnel","tunnel-server"],"created_at":"2024-09-24T13:44:39.004Z","updated_at":"2025-04-09T23:18:21.258Z","avatar_url":"https://github.com/OpenIoTHub.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server for OpenIoTHub\n[![Build Status](https://travis-ci.com/OpenIoTHub/server-go.svg?branch=master)](https://travis-ci.com/OpenIoTHub/server-go)\n\n[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/server-go)\n## OpenIoTHub 物联网服务器\n\n### 如果你有自建转发服务端的需求则可以自建此服务端，服务器需要同时开启指定的TCP，UDP端口\n#### 建好此服务器之后，[网关](https://github.com/OpenIoTHub/gateway-go/releases )就可以连接自建的服务器了！\n\n```\n如果使用redis持久化保存Http代理配置请将配置文件中的redis的使能打开enabled: true\n```\n```\n如果使用redis后OpenIoTHub App无法添加http代理成功请尝试在redis-cli中执行config set stop-writes-on-bgsave-error no\n参考：https://www.baidu.com/s?ie=UTF-8\u0026wd=MISCONF Redis is configured to save RDB snapshots\n127.0.0.1:6379\u003e config set stop-writes-on-bgsave-error no\n如果配置redis后正常使用请忽略本条问题\n```\n\n```yaml\nmy_public_ip_or_domian: \"\" #你运行本软件的服务器的域名或者ip地址，用来使用命令生成token时有用\nlogconfig:\n  enablestdout: true #是否输出日志到控制台\n  logfilepath: \"./mylog.log\" #配置日志输出文件的位置，空则不输出到文件\ncommon:\n  bind_addr: 0.0.0.0 #服务器监听的IP地址，默认监听所有\n  tcp_port: 34320 #服务器使用的tcp端口\n  kcp_port: 34320 #服务器使用的kcp(实际上是udp)端口\n  udp_p2p_port: 34321 #服务器使用的UDP端口，用于辅助p2p\n  kcp_p2p_port: 34322 #服务器使用的kcp（UDP）端口，用于辅助p2p\n  tls_port: 34321 #服务器使用的tls(实际上是tcp)端口，用于安全通信\n  grpc_port: 34322 #服务器使用的grpc(实际上是tcp)端口，用于grpc通信\n  http_port: 80 #服务器监听的http（tcp）端口，用于提供http代理功能\n  https_port: 443 #服务器监听的https（tcp）端口，用于提供https代理功能\nsecurity:\n  login_key: HLLdsa544\u0026*S #用户自定义的服务器秘钥，此为默认，用户个人使用服务器请修改\n  tls_Cert_file_path: \"\"\n  tls_key_file_path: \"\"\n  https_cert_file_path: \"\"\n  https_key_file_path: \"\"\nredisconfig:\n  enabled: false #是否使用redis保存用户http代理配置 \u003c----这里打开redis\n  network: tcp  #redis使用tcp连接，默认即可\n  address: 127.0.0.1:6379 #redis的地址，默认本机，redis默认端口6379，请根据自己的redis配置\n  database: 0 #redis的默认服务器0，如果你不懂请保持0\n  needAuth: false #redis是否需要密码验证，默认不需要false，如果你的redis需要密码请将false改为true并配置下面password为redis密码\n  password: \"\" #redis的密码，needAuth:true时有效\n```\n\nYou can install the pre-compiled binary (in several different ways),\nuse Docker.\n\nHere are the steps for each of them:\n\n## Install the pre-compiled binary\n\n**homebrew tap** (only on macOS for now):\n\n```sh\n$ brew install OpenIoTHub/tap/server-go\n```\n\n**homebrew** (may not be the latest version):\n\n```sh\n$ brew install server-go\n```\nhomebrew pr [server-go](https://github.com/Homebrew/homebrew-core/blob/master/Formula/server-go.rb)\n```text\n*** config file : \n/usr/local/etc/server-go/server-go.yaml\n```\n\n**snapcraft**:\n\n```sh\n$ sudo snap install server-go\n```\n```text\n*** config file : \n/root/snap/server-go/current/server-go.yaml\n```\n\n**scoop**:\n\n```sh\n$ scoop bucket add OpenIoTHub https://github.com/OpenIoTHub/scoop-bucket.git\n$ scoop install server-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```text\n*** config file : \n/etc/server-go/server-go.yaml\n```\n\n\n**Shell script**:\n\n```sh\n$ curl -sfL https://install.goreleaser.com/github.com/OpenIoTHub/server-go.sh | sh\n```\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 openiothub/server:latest\n```\n\nNote that the image will almost always have the last stable Go version.\n\n[releases]: https://github.com/OpenIoTHub/server-go/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeniothub%2Fserver-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopeniothub%2Fserver-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeniothub%2Fserver-go/lists"}