{"id":23882570,"url":"https://github.com/qinghon/gossh","last_synced_at":"2026-06-19T19:02:03.570Z","repository":{"id":183239997,"uuid":"229554015","full_name":"qinghon/gossh","owner":"qinghon","description":"ssh to websocket, webssh backend","archived":false,"fork":false,"pushed_at":"2019-12-22T11:28:10.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-04T02:55:07.114Z","etag":null,"topics":["go","webssh","xteamjs"],"latest_commit_sha":null,"homepage":null,"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/qinghon.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}},"created_at":"2019-12-22T10:56:06.000Z","updated_at":"2022-01-21T01:51:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed715d3a-1b51-4b73-b53d-9904eb13bb4c","html_url":"https://github.com/qinghon/gossh","commit_stats":null,"previous_names":["qinghon/gossh"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qinghon%2Fgossh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qinghon%2Fgossh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qinghon%2Fgossh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qinghon%2Fgossh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qinghon","download_url":"https://codeload.github.com/qinghon/gossh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240255582,"owners_count":19772651,"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":["go","webssh","xteamjs"],"created_at":"2025-01-04T02:55:15.223Z","updated_at":"2026-06-19T19:01:58.551Z","avatar_url":"https://github.com/qinghon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gossh\n\nssh to websocket, webssh backend\n\n通过websocket 转ssh 链接其他主机\n\nSsh via websocket to other hosts\n\n做为webssh后端,需与xteam.js 配合使用\n\nAs a webssh backend, it needs to work with xteam.js\n\n### Install xteam.js\n```bash\nnpm install --save xterm.js \nnpm install --save xterm-addon-attach\n```\n\n### Use\n\n```vue\n\u003ctemplate\u003e\n\u003cdiv ref=\"terminal\" id=\"terminal\"\u003e\u003c/div\u003e\n\u003c/template\u003e\nimport { AttachAddon } from 'xterm-addon-attach'\nimport { Terminal } from 'xterm'\nimport 'xterm/css/xterm.css'\n\nexport default {\n  name: 'CompTerm',\n  data () {\n    return {\n      isFullScreen: false,\n      searchKey: '',\n      v: false,\n      ws: null,\n      term: null,\n        hostname: '0.0.0.0',\n        Port: 22,\n        username: 'root',\n        password: '',\n        pri_key: '',\n        wsUrl: 'ws://127.0.0.1:9018/ws?' + 'cols=' + this.term.cols + '\u0026rows=' + this.term.rows + '\u0026hostname=' + this.hostname + '\u0026port=' + this.Port + '\u0026user=' + this.username + '\u0026pd=' + this.password + '\u0026pk=' + this.pri_key\n    }\n  }\n\nthis.term = new Terminal({\n        rows: 35,\n        fontSize: 18,\n        cursorBlink: true,\n        cursorStyle: 'bar',\n        bellStyle: 'sound',\n        theme: defaultTheme\n      })\n this.term.open(this.$refs.terminal)\n this.ws = new WebSocket(this.wsUrl)\nconst attachAddon = new AttachAddon(this.ws)\nthis.term.loadAddon(attachAddon)\n```\n\n## parameter\n\n```golang\n\tHostname string `form:\"hostname\" json:\"hostname\" binding:\"required\"`\n\tPort     string `form:\"port,default=22\" json:\"port\" `\n\tUser     string `form:\"user,default=root\" json:\"user\"`\n\tPassword string `form:\"pd\" json:\"password\"` //base64 encoded password\n\tCols     int    `form:\"cols,default=120\" json:\"cols\"`\n\tRows     int    `form:\"rows,default=32\" json:\"rows\"`\n\tPriKey   string `form:\"pk\" json:\"pri_key\"` //base64 private key\n```\n## Build \n```bash\ngo build \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqinghon%2Fgossh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqinghon%2Fgossh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqinghon%2Fgossh/lists"}