coderemote 0.3.8 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +38 -3
  2. package/dist/coderemote.js +3387 -657
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -68,10 +68,39 @@ opens your browser to sign in with GitHub. Prefer a Microsoft account? Run
68
68
  <img src="https://raw.githubusercontent.com/CodeRemoteApp/coderemote/main/docs/images/how-it-works.png" width="760" alt="How it works: the Code Remote app on the iPhone connects over HTTPS/WSS to the Microsoft Dev Tunnels relay; coderemote on your computer (127.0.0.1:31580) connects outbound to the same relay and serves files, git and terminals from the shared folder. Security at each hop: token in the iPhone Keychain, only your account through the relay, token check and one folder on the computer.">
69
69
  </p>
70
70
 
71
- `coderemote` starts a small agent that listens on `127.0.0.1` only, and publishes it through
71
+ `coderemote` starts a small agent that listens on `127.0.0.1`, and publishes it through
72
72
  a [Microsoft Dev Tunnel](https://learn.microsoft.com/azure/developer/dev-tunnels/overview).
73
- The tunnel connects outward, so nothing on your network has to be opened, and it works from
74
- anywhere: cellular, hotel Wi-Fi, behind NAT or a firewall.
73
+ The tunnel connects outward, so it works from anywhere: cellular, hotel Wi-Fi, behind NAT or a
74
+ firewall.
75
+
76
+ When the phone is on the same network as the computer, the app skips the relay and talks to the
77
+ agent directly, which is much faster. For that, `coderemote up` also listens on the local network,
78
+ over TLS, on its own port (the agent's port + 1000, `32580` by default). The app switches back to
79
+ the tunnel by itself when it leaves the network, or when the direct connection is blocked (guest
80
+ Wi-Fi often is). `coderemote up --no-lan` turns this off; `"lan": false` in
81
+ `~/.coderemote/config.json` makes that the default.
82
+
83
+ On Windows, the first `coderemote up` makes Windows Defender Firewall ask whether node may
84
+ accept incoming connections: choose **Allow**. The firewall still keeps phones out on networks
85
+ Windows classes **Public**, which a new Wi-Fi often is, and for good after **Cancel**. `up` checks
86
+ both and prints the fix, for an administrator terminal:
87
+
88
+ ```powershell
89
+ # a network you trust: make it Private
90
+ Set-NetConnectionProfile -InterfaceAlias "Wi-Fi" -NetworkCategory Private
91
+ # or let in only the LAN port, from the local network
92
+ netsh advfirewall firewall add rule name="Code Remote LAN 32580" dir=in action=allow protocol=TCP localport=32580 remoteip=localsubnet
93
+ # after Cancel: remove the Block rule it left (up prints its name)
94
+ Remove-NetFirewallRule -Name "<rule name>"
95
+ ```
96
+
97
+ On a company computer whose firewall is managed by Group Policy, rules made on it are ignored;
98
+ `up` says so, and the app uses the tunnel (your IT can allow the LAN port).
99
+
100
+ No internet on the computer (the router or the provider is down)? `coderemote up` still starts,
101
+ serving the local network only, and its QR pairs the app on the same Wi-Fi. The tunnel connects
102
+ on its own once the internet is back, without a restart; sign in on the phone then, and it keeps
103
+ working away from home.
75
104
 
76
105
  ## Security
77
106
 
@@ -86,6 +115,11 @@ Remote shell access is serious, so access is locked down by default:
86
115
  escapes are blocked); terminals start there. A terminal is still a real shell with your
87
116
  user's permissions.
88
117
  - **Encrypted.** All traffic is HTTPS / WSS (TLS 1.2+) to the relay.
118
+ - **Local network.** Direct connections are TLS too, with a certificate the agent makes once.
119
+ The app learns its fingerprint from the QR (or through the tunnel) and pins it, so a device pretending to be
120
+ your computer gets nothing. The pairing token is still required. There is no account sign-in
121
+ on this path, so `--no-lan` is the choice on networks you don't trust.
122
+ `coderemote rotate-token` also replaces the certificate.
89
123
 
90
124
  `coderemote up --allow-anonymous` skips the account sign-in when you want the pairing token
91
125
  alone.
@@ -103,6 +137,7 @@ Found a vulnerability? See the
103
137
  coderemote up # share this folder through a dev tunnel, print the pairing QR
104
138
  coderemote up --allow-anonymous # same, without the account sign-in (alias --no-auth)
105
139
  coderemote up --web # also run `code tunnel`: open this folder in VS Code on vscode.dev
140
+ coderemote up --no-lan # phones always go through the tunnel, even on the same Wi-Fi
106
141
  coderemote status # running agents and their terminal sessions
107
142
  coderemote kill <id>... # end terminal sessions (an id prefix from `status` is enough)
108
143
  coderemote kill --all # end every session