{"id":13439607,"url":"https://github.com/zhaojh329/rttys","last_synced_at":"2025-05-15T02:09:53.479Z","repository":{"id":28276023,"uuid":"117840318","full_name":"zhaojh329/rttys","owner":"zhaojh329","description":"Access your device's terminal from anywhere via the web.","archived":false,"fork":false,"pushed_at":"2025-05-12T03:37:50.000Z","size":68103,"stargazers_count":699,"open_issues_count":31,"forks_count":205,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-05-12T04:32:33.152Z","etag":null,"topics":["http-proxy","remote-console","remote-control","remote-debug","remote-shell","tty","webshell"],"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/zhaojh329.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,"zenodo":null}},"created_at":"2018-01-17T13:31:34.000Z","updated_at":"2025-05-12T03:37:30.000Z","dependencies_parsed_at":"2024-06-18T19:56:47.486Z","dependency_job_id":"55808ba0-214d-4111-90b0-4953f8299e8c","html_url":"https://github.com/zhaojh329/rttys","commit_stats":{"total_commits":569,"total_committers":15,"mean_commits":37.93333333333333,"dds":0.4657293497363796,"last_synced_commit":"678512702c15d759e2dfedb945fff6b8e7826004"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Frttys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Frttys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Frttys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Frttys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhaojh329","download_url":"https://codeload.github.com/zhaojh329/rttys/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259386,"owners_count":22040821,"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":["http-proxy","remote-console","remote-control","remote-debug","remote-shell","tty","webshell"],"created_at":"2024-07-31T03:01:15.545Z","updated_at":"2025-05-15T02:09:48.463Z","avatar_url":"https://github.com/zhaojh329.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# rttys([中文](/README_ZH.md))\n\n[1]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=plastic\n[2]: /LICENSE\n[3]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=plastic\n[4]: https://github.com/zhaojh329/rttys/pulls\n[5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=plastic\n[6]: https://github.com/zhaojh329/rttys/issues/new\n[7]: https://img.shields.io/badge/release-4.4.1-blue.svg?style=plastic\n[8]: https://github.com/zhaojh329/rttys/releases\n[9]: https://github.com/zhaojh329/rttys/workflows/build/badge.svg\n\n[![license][1]][2]\n[![PRs Welcome][3]][4]\n[![Issue Welcome][5]][6]\n[![Release Version][7]][8]\n![Build Status][9]\n\nThis is the server program of [rtty](https://github.com/zhaojh329/rtty)\n\n## Build from source\ngolang and node 20+ is required\n\n    cd ui\n    npm install\n    npm run build\n    cd ..\n    go build\n\n## Authorization(optional)\n### Token\nGenerate a token\n\n    $ rttys token\n    Please set a password:******\n    Your token is: 34762d07637276694b938d23f10d7164\n\nUse token\n\n    $ rttys run -t 34762d07637276694b938d23f10d7164\n\n### Use your own authentication server\nIf the device authentication URL is configured, when the device connecting,\nrttys will initiate an authentication request to this URL, and the authentication\nserver will return whether the authentication has been passed.\n\nRequest data format:\n\n    {\"devid\":\"test\", \"token\":\"34762d07637276694b938d23f10d7164\"}\n\nAuthentication Server Response Format:\n\n    {\"auth\": true}\n\n### mTLS\nYou can enable mTLS by specifying device CA storage (valid file) in config file or from CLI (variable ssl-cacert).\nDevice(s) without valid CA in storage will be disconnected in TLS handshake.\n\n## Database Preparation\n## Sqlite\ns#qlite://rttys.db\n\n### MySql or Mariadb\nmysql://rttys:rttys@tcp(localhost)/rttys\n\nOn database instance, login to database console as root:\n```\nmysql -u root -p\n```\n\nCreate database user which will be used by Rttys, authenticated by password. This example uses 'rttys' as password. Please use a secure password for your instance.\n```\nCREATE USER 'rttys' IDENTIFIED BY 'rttys';\n```\n\nCreate database with UTF-8 charset and collation. Make sure to use utf8mb4 charset instead of utf8 as the former supports all Unicode characters (including emojis) beyond Basic Multilingual Plane. Also, collation chosen depending on your expected content. When in doubt, use either unicode_ci or general_ci.\n```\nCREATE DATABASE rttys CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';\n```\n\nGrant all privileges on the database to database user created above.\n```\nGRANT ALL PRIVILEGES ON rttys.* TO 'rttys';\nFLUSH PRIVILEGES;\n```\n\nQuit from database console by exit.\n\n## nginx proxy\n\n```\n# rttys.conf\n\naddr-user: 127.0.0.1:5913\n\naddr-http-proxy: 127.0.0.1:5914\nhttp-proxy-redir-url: http://web.your-server.com\nhttp-proxy-redir-domain: .your-server.com\n```\n\n```\n# nginx.conf\n\nserver {\n    listen 80;\n\n    server_name rtty.your-server.com;\n\n    location /connect/ {\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"Upgrade\";\n        proxy_pass http://127.0.0.1:5913;\n    }\n\n    location / {\n        proxy_pass http://127.0.0.1:5913;\n    }\n}\n\nserver {\n    listen 80;\n\n    server_name web.your-server.com;\n\n    location / {\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"Upgrade\";\n        proxy_pass http://127.0.0.1:5914;\n    }\n}\n```\n\nThe parameter 'http-proxy-redir-url' and 'http-proxy-redir-domain' in rttys.conf can also be configured\nby setting new HTTP headers in nginx.\n\n```\nserver {\n    listen 80;\n\n    server_name rtty.your-server.com;\n\n    location /connect/ {\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"Upgrade\";\n        proxy_pass http://127.0.0.1:5913;\n    }\n\n    location /web/ {\n        proxy_set_header HttpProxyRedir http://web.your-server.com;\n        proxy_set_header HttpProxyRedirDomain .your-server.com\n        proxy_pass http://127.0.0.1:5913;\n    }\n\n    location / {\n        proxy_pass http://127.0.0.1:5913;\n    }\n}\n\nserver {\n    listen 80;\n\n    server_name web.your-server.com;\n\n    location / {\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"Upgrade\";\n        proxy_pass http://127.0.0.1:5914;\n    }\n}\n```\n\n## Docker\n### Simple run\n\n    sudo docker run -it -p 5912:5912 -p 5913:5913 -p 5914:5914 zhaojh329/rttys:latest \\\n        run --addr-http-proxy :5914\n\n### Using config file\n\n    sudo mkdir -p /opt/rttys\n    sudo sh -c 'echo \"addr-http-proxy: :5914\" \u003e /opt/rttys/rttys.conf'\n    sudo docker run -it -p 5912:5912 -p 5913:5913 -p 5914:5914 -v /opt/rttys:/etc/rttys \\\n        zhaojh329/rttys:latest run -conf /etc/rttys/rttys.conf\n\n## Contributing\nIf you would like to help making [rttys](https://github.com/zhaojh329/rttys) better,\nsee the [CONTRIBUTING.md](https://github.com/zhaojh329/rttys/blob/master/CONTRIBUTING.md) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaojh329%2Frttys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhaojh329%2Frttys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaojh329%2Frttys/lists"}