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

Commit 2f52cef

Browse files
authored
Merge branch 'master' into proxy-support
2 parents 5ea05eb + 8c07a08 commit 2f52cef

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
@@ -53,7 +53,7 @@ func (c *rootCmd) RegisterFlags(fl *flag.FlagSet) {
5353
fl.BoolVar(&c.skipSync, "skipsync", false, "skip syncing local settings and extensions to remote host")
5454
fl.BoolVar(&c.syncBack, "b", false, "sync extensions back on termination")
5555
fl.BoolVar(&c.printVersion, "version", false, "print version information and exit")
56-
fl.StringVar(&c.bindAddr, "bind", "", "local bind address for ssh tunnel")
56+
fl.StringVar(&c.bindAddr, "bind", "", "local bind address for SSH tunnel, in [HOST][:PORT] syntax (default: 127.0.0.1)")
5757
fl.StringVar(&c.sshFlags, "ssh-flags", "", "custom SSH flags")
5858
}
5959

sshcode.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ func sshCode(host, dir string, o options) error {
168168
}
169169

170170
func parseBindAddr(bindAddr string) (string, error) {
171-
if bindAddr == "" {
172-
bindAddr = ":"
171+
if !strings.Contains(bindAddr, ":") {
172+
bindAddr += ":"
173173
}
174174

175175
host, port, err := net.SplitHostPort(bindAddr)
@@ -345,6 +345,7 @@ func downloadScript(codeServerPath string) string {
345345
return fmt.Sprintf(
346346
`set -euxo pipefail || exit 1
347347
348+
[ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1
348349
pkill -f %v || true
349350
mkdir -p ~/.local/share/code-server %v
350351
cd %v

0 commit comments

Comments
 (0)