@@ -50,10 +50,13 @@ import (
5050 "os"
5151 "os/signal"
5252 "syscall"
53+
54+ "github.com/nicodes/ormos/relay"
5355)
5456
5557// Main accepts `ormos`, `ormos --config PATH`, `ormos --help` and
56- // `ormos --version`, and nothing else — no `-h` shorthand, no subcommands.
58+ // `ormos --version`, `ormos --protocol-version`, and nothing else — no `-h`
59+ // shorthand, no subcommands.
5760// Parsed by hand rather than with the flag package, which would accept
5861// single-dash spellings and add its own -h.
5962//
@@ -69,6 +72,9 @@ func Main(args []string, version string) {
6972 case len (args ) == 1 && args [0 ] == "--version" :
7073 fmt .Println (version )
7174 return
75+ case len (args ) == 1 && args [0 ] == "--protocol-version" :
76+ fmt .Println (relay .StreamFenceVersion )
77+ return
7278 case len (args ) == 2 && args [0 ] == "--config" && args [1 ] != "" :
7379 configFileOverride = args [1 ]
7480 case args [0 ] == "--config" :
9096 ormos --config PATH run with a different config file
9197 ormos --help show this
9298 ormos --version print the version
99+ ormos --protocol-version print the advertised tunnel protocol version
93100
94101Just run ormos. If this machine isn't registered yet (or its credentials were
95102revoked by forgetting it in the UI), it shows a short pairing code — approve it
0 commit comments