Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Commit 1bc6ac0

Browse files
authored
Merge branch 'master' into reuse-ssh-connection
2 parents dbf7a48 + 8c07a08 commit 1bc6ac0

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ We currently support:
3636
- MacOS
3737
- WSL
3838

39+
For the remote server, we currently only support Linux `x86_64` (64-bit)
40+
servers with `glibc`. `musl` libc (which is most notably used by Alpine Linux)
41+
is currently not supported on the remote server:
42+
[#122](https://github.com/cdr/sshcode/issues/122).
43+
3944
## Usage
4045

4146
```bash

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (c *rootCmd) RegisterFlags(fl *flag.FlagSet) {
5555
fl.BoolVar(&c.syncBack, "b", false, "sync extensions back on termination")
5656
fl.BoolVar(&c.printVersion, "version", false, "print version information and exit")
5757
fl.BoolVar(&c.noReuseConnection, "no-reuse-connection", false, "do not reuse SSH connection via control socket")
58-
fl.StringVar(&c.bindAddr, "bind", "", "local bind address for ssh tunnel")
58+
fl.StringVar(&c.bindAddr, "bind", "", "local bind address for SSH tunnel, in [HOST][:PORT] syntax (default: 127.0.0.1)")
5959
fl.StringVar(&c.sshFlags, "ssh-flags", "", "custom SSH flags")
6060
}
6161

sshcode.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ func expandPath(path string) string {
210210
}
211211

212212
func parseBindAddr(bindAddr string) (string, error) {
213-
if bindAddr == "" {
214-
bindAddr = ":"
213+
if !strings.Contains(bindAddr, ":") {
214+
bindAddr += ":"
215215
}
216216

217217
host, port, err := net.SplitHostPort(bindAddr)
@@ -481,6 +481,7 @@ func downloadScript(codeServerPath string) string {
481481
return fmt.Sprintf(
482482
`set -euxo pipefail || exit 1
483483
484+
[ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1
484485
pkill -f %v || true
485486
mkdir -p ~/.local/share/code-server %v
486487
cd %v

0 commit comments

Comments
 (0)