diff --git a/Makefile b/Makefile index 4234695b..17f50f01 100644 --- a/Makefile +++ b/Makefile @@ -55,3 +55,7 @@ release: bin/equinox bin/equinox: mkdir -p bin curl -s https://bin.equinox.io/c/75JtLRTsJ3n/release-tool-beta-$(EQUINOX_PLATFORM).tgz | tar xz -C bin/ + +.PHONY: tunnel-deps +tunnel-deps: + capnp compile -ogo -I ./tunnelrpc tunnelrpc/tunnelrpc.capnp diff --git a/tunnelrpc/tunnelrpc.capnp.go b/tunnelrpc/tunnelrpc.capnp.go index 66547f35..df34b32b 100644 --- a/tunnelrpc/tunnelrpc.capnp.go +++ b/tunnelrpc/tunnelrpc.capnp.go @@ -105,6 +105,11 @@ func (s Authentication_List) At(i int) Authentication { return Authentication{s. func (s Authentication_List) Set(i int, v Authentication) error { return s.List.SetStruct(i, v.Struct) } +func (s Authentication_List) String() string { + str, _ := text.MarshalList(0xc082ef6e0d42ed1d, s.List) + return str +} + // Authentication_Promise is a wrapper for a Authentication promised by a client call. type Authentication_Promise struct{ *capnp.Pipeline } @@ -119,12 +124,12 @@ type TunnelRegistration struct{ capnp.Struct } const TunnelRegistration_TypeID = 0xf41a0f001ad49e46 func NewTunnelRegistration(s *capnp.Segment) (TunnelRegistration, error) { - st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4}) + st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 5}) return TunnelRegistration{st}, err } func NewRootTunnelRegistration(s *capnp.Segment) (TunnelRegistration, error) { - st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4}) + st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 5}) return TunnelRegistration{st}, err } @@ -228,12 +233,26 @@ func (s TunnelRegistration) SetTunnelID(v string) error { return s.Struct.SetText(3, v) } +func (s TunnelRegistration) OriginCert() ([]byte, error) { + p, err := s.Struct.Ptr(4) + return []byte(p.Data()), err +} + +func (s TunnelRegistration) HasOriginCert() bool { + p, err := s.Struct.Ptr(4) + return p.IsValid() || err != nil +} + +func (s TunnelRegistration) SetOriginCert(v []byte) error { + return s.Struct.SetData(4, v) +} + // TunnelRegistration_List is a list of TunnelRegistration. type TunnelRegistration_List struct{ capnp.List } // NewTunnelRegistration creates a new list of TunnelRegistration. func NewTunnelRegistration_List(s *capnp.Segment, sz int32) (TunnelRegistration_List, error) { - l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4}, sz) + l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 5}, sz) return TunnelRegistration_List{l}, err } @@ -245,6 +264,11 @@ func (s TunnelRegistration_List) Set(i int, v TunnelRegistration) error { return s.List.SetStruct(i, v.Struct) } +func (s TunnelRegistration_List) String() string { + str, _ := text.MarshalList(0xf41a0f001ad49e46, s.List) + return str +} + // TunnelRegistration_Promise is a wrapper for a TunnelRegistration promised by a client call. type TunnelRegistration_Promise struct{ *capnp.Pipeline } @@ -455,6 +479,11 @@ func (s RegistrationOptions_List) Set(i int, v RegistrationOptions) error { return s.List.SetStruct(i, v.Struct) } +func (s RegistrationOptions_List) String() string { + str, _ := text.MarshalList(0xc793e50592935b4a, s.List) + return str +} + // RegistrationOptions_Promise is a wrapper for a RegistrationOptions promised by a client call. type RegistrationOptions_Promise struct{ *capnp.Pipeline } @@ -539,6 +568,11 @@ func (s Tag_List) At(i int) Tag { return Tag{s.List.Struct(i)} } func (s Tag_List) Set(i int, v Tag) error { return s.List.SetStruct(i, v.Struct) } +func (s Tag_List) String() string { + str, _ := text.MarshalList(0xcbd96442ae3bb01a, s.List) + return str +} + // Tag_Promise is a wrapper for a Tag promised by a client call. type Tag_Promise struct{ *capnp.Pipeline } @@ -664,6 +698,11 @@ func (s ServerInfo_List) At(i int) ServerInfo { return ServerInfo{s.List.Struct( func (s ServerInfo_List) Set(i int, v ServerInfo) error { return s.List.SetStruct(i, v.Struct) } +func (s ServerInfo_List) String() string { + str, _ := text.MarshalList(0xf2c68e2547ec3866, s.List) + return str +} + // ServerInfo_Promise is a wrapper for a ServerInfo promised by a client call. type ServerInfo_Promise struct{ *capnp.Pipeline } @@ -925,6 +964,11 @@ func (s TunnelServer_registerTunnel_Params_List) Set(i int, v TunnelServer_regis return s.List.SetStruct(i, v.Struct) } +func (s TunnelServer_registerTunnel_Params_List) String() string { + str, _ := text.MarshalList(0xb70431c0dc014915, s.List) + return str +} + // TunnelServer_registerTunnel_Params_Promise is a wrapper for a TunnelServer_registerTunnel_Params promised by a client call. type TunnelServer_registerTunnel_Params_Promise struct{ *capnp.Pipeline } @@ -1004,6 +1048,11 @@ func (s TunnelServer_registerTunnel_Results_List) Set(i int, v TunnelServer_regi return s.List.SetStruct(i, v.Struct) } +func (s TunnelServer_registerTunnel_Results_List) String() string { + str, _ := text.MarshalList(0xf2c122394f447e8e, s.List) + return str +} + // TunnelServer_registerTunnel_Results_Promise is a wrapper for a TunnelServer_registerTunnel_Results promised by a client call. type TunnelServer_registerTunnel_Results_Promise struct{ *capnp.Pipeline } @@ -1058,6 +1107,11 @@ func (s TunnelServer_getServerInfo_Params_List) Set(i int, v TunnelServer_getSer return s.List.SetStruct(i, v.Struct) } +func (s TunnelServer_getServerInfo_Params_List) String() string { + str, _ := text.MarshalList(0xdc3ed6801961e502, s.List) + return str +} + // TunnelServer_getServerInfo_Params_Promise is a wrapper for a TunnelServer_getServerInfo_Params promised by a client call. type TunnelServer_getServerInfo_Params_Promise struct{ *capnp.Pipeline } @@ -1133,6 +1187,11 @@ func (s TunnelServer_getServerInfo_Results_List) Set(i int, v TunnelServer_getSe return s.List.SetStruct(i, v.Struct) } +func (s TunnelServer_getServerInfo_Results_List) String() string { + str, _ := text.MarshalList(0xe3e37d096a5b564e, s.List) + return str +} + // TunnelServer_getServerInfo_Results_Promise is a wrapper for a TunnelServer_getServerInfo_Results promised by a client call. type TunnelServer_getServerInfo_Results_Promise struct{ *capnp.Pipeline } @@ -1195,6 +1254,11 @@ func (s TunnelServer_unregisterTunnel_Params_List) Set(i int, v TunnelServer_unr return s.List.SetStruct(i, v.Struct) } +func (s TunnelServer_unregisterTunnel_Params_List) String() string { + str, _ := text.MarshalList(0x9b87b390babc2ccf, s.List) + return str +} + // TunnelServer_unregisterTunnel_Params_Promise is a wrapper for a TunnelServer_unregisterTunnel_Params promised by a client call. type TunnelServer_unregisterTunnel_Params_Promise struct{ *capnp.Pipeline } @@ -1245,6 +1309,11 @@ func (s TunnelServer_unregisterTunnel_Results_List) Set(i int, v TunnelServer_un return s.List.SetStruct(i, v.Struct) } +func (s TunnelServer_unregisterTunnel_Results_List) String() string { + str, _ := text.MarshalList(0xa29a916d4ebdd894, s.List) + return str +} + // TunnelServer_unregisterTunnel_Results_Promise is a wrapper for a TunnelServer_unregisterTunnel_Results promised by a client call. type TunnelServer_unregisterTunnel_Results_Promise struct{ *capnp.Pipeline } @@ -1253,92 +1322,94 @@ func (p TunnelServer_unregisterTunnel_Results_Promise) Struct() (TunnelServer_un return TunnelServer_unregisterTunnel_Results{s}, err } -const schema_db8274f9144abc7e = "x\xda\x9cV]\x8c\x14\xd5\x12\xae\xef\x9c\x99\xedY\xb2" + - "\xcbl\xa7\x87\\\x98\\2\x09Y\xc2OX.\\\xe0" + - "f\xd9{\xaf\xfb\xe3\x82\x99uY\xa6\x190\x08\x98\xd0" + - "\xcc\x1c\x86^{\xba'\xdd=\x08D~$\x18\x95(" + - "Q\x91\x071\x18$1Qc\xfc\x89&\x06\x83\x09\xbe" + - "H\x0c1\xbc\xa8\x91Hb\x94\xec\x03DC\xdc\xe8\x83" + - "&\xa6\xcd\xe9\xd9\x9ei\x16\x05\xf4\xed\xccw\xeaT}" + - "U]\xf5\xd5,\xfb\x07\x1f`\xcb\x93\xdf$\x89\xf4\xe1" + - "d[\xf0\xbf\xea\xa53\xff9q\xf1\x08\xa9Y\x16\x1c" + - "87\x92\xf9\xc5?\xfc5\x11V|\xc1\xf6A\xbb\xc6" + - "\x14\"m\x82\xad'\x04\x97\x96\x9c\xfb\xf0\xd9\xf7\x9ex" + - "\x89\xf4\x05\x00QB!Z\xf1\x1b\xfb\x15\x04M\xe5\xfd" + - "\x84\xe0\x85\xaf>\x1a\xab>w\xf2\x0c\xa9\x0b\xa2\xfb\xd5" + - "\x9c1J\x04\xb3\xf2\xb8r~y\xe2\x83\xc6M\x92\xcb" + - "\xab\x1e~]>\x1d\xe4o\x13\x82\xb9?\x0cu\xda7" + - "\x0e\x9f'5\x8b\x16\x8b\x86\xe1\xb7|\x04\xda\xcf\xf2\xa8" + - "\xfd\x18\x1a\x8fl=\xfe|r\xe2\xf8\x05\xd2\xb3\x88q" + - "N\xb6I\xebg\x12.\xb4W\xc2\xe0\xa7\x12\x0e#\x04" + - "\xd9w\xfe\xfb\xd6P\xf9\xf2\xc5i\xbe\xc3\xcc\xd6)\x93" + - "\xda\x83\x8a:\x89\xa1\x93\x10\xecr<\xdf6\xaa" + - "\x82\x88\xd0A\x0c\x1d\x84\x83N\xcd7\x1d\xdbCWk" + - "\x1e\x08\xe8\x8a\x95\xe0\x0f>\xf0`\xdd\xdf%l\xdf," + - "\x19\xf21Q\xf8m[\x94\xe7\x11\xe9\x03\x1c\xfah\x8c" + - "r\xfe\xdf\xb1<\"\xca\xebv\xb4\xf2P\x1e\x16{#" + - "V9Q5L+\xfa\x15%3H\xca\xfd-\x9b\xdb" + - "\xf1\xdb\x10V\xd5\x0d\xd9\xad\xaf\xe5\xc2\x0c%\xc7%\x11" + - "Gm>F\x88\x8a\xdd\xe0(.C\x8b\xa6\xd6\x83!" + - "\xa2\xe2B\x89\xafD\x8b\xa9\xb6\x1cY\xa2\xe2\x12\x89\xf7" + - "\x82\x01<\x03N\xa4\xad\xc2\x1bD\xc5^\x09\x0fK\xf3" + - "\x04\xcf A\xa4\x0d\x86\xee\x07$>*\xf1d\"\x83" + - "$\x91\x96\xc7b\xa2\xe2\xb0\xc4\xb7K\xbc\x8de\xd0F" + - "\xa4=\x84q\xa2\xe26\x89\xef\x92\xb8\x92\xcc\xc8\x11\xd5" + - "\x04\\\xa2bY\xe25\x89\xa7fg\x90\"\xd2\xaa!" + - "nI|\x8f\xc4\xdb\xe7d\xd0N\xa4\xd5q\x98\xa8\xe8" + - "K\xfc\x90\xc4g \x83\x19D\xda~\x9c$*\x1e\x92" + - "\xf8\xd3`\x08J\x96)l?_\x8ew\xc2n\xe1z" + - "\xa6cG\xbf\xb9\xe35K-\xa6\x06\x1a\x8d6-8" + - "i9\xd1H\xb7d\x9f\x804!\xa89\x8e5vs" + - "\x87\xa5}\xa3\xe2a&\xa1\xc0\x81\xae\x96\x8c\x12$\x18" + - "\x84\xf3^\xf2MJ;v\xbe\x8c6bhk~\xf2" + - "Q\x87r%\xc3\xca\xd7\x9aLLo\xb0\xee;\xf5\x1a" + - "\xe5\xca\x86/\xca\x001\x80\x10\xb8u{\xad\xebT7" + - "B\xb8U\xd36,j\xde\x94\x9cj\xcd\x15\x9e\x07\xd3" + - "\xb1\xf5\xbaa\x99\xdc\xdf\x8bvbh\x8f\xf5\x10\x9b\xde" + - "C\xb9Z\xdfF\xa3\"{&\xd5\xec\xebE\x8b\x89\xf4" + - "n\x0e}Y\xac\xaf{d_/\xe4\xd0W2\xa4\xe5" + - "p5{x\xb7a\xd5\xc5-\xddz'\x15\xab\x08\xbf" + - "q\xca\xdb;\x9d\xee\x82\xe1*F\xd5\xfb\x9b\xaf7\x08" + - "/-\xc5(\xae\x80}Dz\x8aC\xcf0\xf4\xbb\xa1" + - "V\xa1\xab\xb5%\xa6\x8d>\xff\xb3p\xfd\x8d(\x8d\xb9" + - "O\x125W3\xa2\x8d\xa4\xea\xfb\x88\xa9y\x05\xadm" + - "\x88h\xf9\xa9\xffw\x89\xa9\xab\x14\xb0\xe6\xbf\x01D[" + - "_]t\x94\x98:_\x09\"e\xa4\xfeF\xc8\x01\x04" + - "Qv\x94\x0b\xf3\x1b@\x10\xc9/\"\x05%\x1a@\x01" + - "w_\xee[\xd4;\xe7\xddM\xc5\xa2Uy\xe7z5" + - "\xe2\xa4%_Y\xad\x98\xdfq\"\xbd\x83C\x9f\xcd\x10" + - "X\xce\x94\x94\xa6\xc7b-t;\x89k\x10\x8e\x84." + - "-\x1fK\xff\x99\xa6\xff\xfdR\x85\xf7p\xe8Gb\xdd" + - "\xfa\x98\x04\x1f\xe5\xd0\x9f\x8c\xa9\xf0\xe3r\x9b\x1c\xe1\xd0" + - "O7\x85M=u\x94H?\xcd\xa1\xbf\xd9R5\xf5" + - "ui\xf8\x1a\x87\xfe>\x83\"\\7\xe2\xa9\xd4\xdd\x96" + - "X[Ne\xd4\xb4\x85'%`j\xea\xe5\x95\x9c\xf5" + - "\x9ap\xab\x86-l\xf8k\x0d\xd3\xaa\xbb\x82Zc\xda" + - "\xc8/?\x1cS\x8e\xdf\x03\x00\x00\xff\xff#\xa3\xb8\x8f" +const schema_db8274f9144abc7e = "x\xda\x9cV]\x88\x14W\x16>\xdf\xbd\xddS=2" + + "cOQ-h\xb32 #\xfe\xe0\xb8\xba\xea2\xce" + + "\xfe\xcc\xcf\x8e.=;\x8e}m\xddu\xd5\x05\xcb\xee" + + "k[\xb3\xddUMU\xb5\xab\x82?\xc8\xc2\xb2\xb2+" + + "\xbb\xab\xc2\xea\xe2\xa2\x92\xbc\xe4!?\xe4!\x18&`" + + " \x89\x09F\xccC\x12\x94\x08!\x91yP\x12$C" + + "\xf2\x90@\xa8p\xab\xa7\xba\xcb\xd1\xa8\xc9\xdb\xed\xef\x9e" + + "{\xcewN\x9d\xf3\x9d^\xb5\x84\x0f\xb2\xd5\xc9\x8f\x93" + + "Db$\xd9\x16\xfc\xb2z\xe3\xd2\xcf\xcf\\\xfb+\xe9" + + "Y\x16\x1c\x99\x1c\xcd|\xed\x1f\xff\x88\x08k>`\x87" + + "`\xdce\x1a\x911\xc56\x13\x82\x1b+&_\xfd\xd7" + + "\xcb\x7f\xfb\x1f\x89%\x00QB#Z\xf3-\xfb\x06\x04" + + "C\xe7\x03\x84\xe0\xf4\xcd\xd7\xc6\xab\xff>w\x89\xf4%" + + "\xd1\xfdz\xce\x18%\x82y9\xdc\xbe\xb2:\xf1J\xe3" + + "&\xc9\xd5U/\xbf\xa7\x9e\x0e\xf1\x17\x08\xc1\xc2\xcf\x87" + + ";\xed\xfb\xc7\xaf\x90\x9eE\x8bE\xc3\xf0\x13>\x0a\xe3" + + "+u4\xbe\x08\x8dGw\x9e\xfaOr\xea\xd4U\x12" + + "Y\xc48'\xdb\x94\xf5?\x13.\x8c\x8ba\xf0\xf3\x09" + + "\x87\x11\x82\xec\x8b\xbfx~\xb8t\xeb\xda,\xdfaf" + + "\x9b\xb4i\xe3\x8f\x9a:m\xd3\xfeB\x08\xd8\x94\xb9\xe0" + + "\xd8\x87\xbf\xbe\x1dK\xe1%\xedSP\"\x18\xff\xfd\xce" + + "\x89\xf6\xc3w\xee\xcc\xa4\x00u\xf5\xac\x16\xa6pYS" + + "\xd9\xaf\xdb=$w\xf5m\xbfGz\x96?P\xc8[" + + "Z?\x8c\xbba\x90)\xed\xaaQMiD\xc1\xc9#" + + "#\x9b\xd7/z}:\xeen[jZ\xb9\xb3R\xca" + + "\xdd\xde\xbe\xcf~\xbb\xf8\xe4[\xd3\xb3X\x87\x86\x7fO" + + "-\x87qV\xf91\xce(\xe3\xfb\x1b\xff\xff~6\x9d" + + "\xfdRd\x11\xb7M*\xdb\xcb\xa9\x09\x18\xd7\x95\xed\x9a" + + "wR\x7f\x00\xf5\x06~\xdd\xb6e\xc5\xad%\x8a?\x8d" + + "\x8e\xc5\x95E\xb3f\xd7\xfa7\x1c\xb0<\xdf\xb2\xcb[" + + "C| \xefT\xac\xe2\xc1< :\xc0\x88\xf4\x85\xfd" + + "D\x80>o\x07\x11\x98\xae\x0f\x13\x0dXe\xdbqe" + + "P\xb2\xbc\xa2c\xdb\x92x\xd1?\xba\xc7\xac\x98vQ" + + "6\x03\xb5=\x1c\xa8\x11\xa0 \xdd\xfd\xd2]Y\xb7]" + + "Y\xb6<_\xba\x0d\xb8g o\xbaf\xd5\x13\x09\x9e" + + " J\x80H\xef:\x89\xa1\x93\x10\xecs" + + "<\xdf6\xab\x92\x88\xd0A\x0c\x1d\x84\xa3N\xcd\xb7\x1c" + + "\xdbCWk\x1e\x08\xe8\x8a\x95\xe0\x11\x1fx\xa8\xee\xef" + + "\x93\xb6o\x15M\xf5\x98(\xfc\xb6-\xca\x8b\x88\xc4 " + + "\x87\x18\x8bQ\xce\xfd,\x96GDy\xd3\x9eV\x1e\xda" + + "\x9f\xe5\xc1\x88U\xb7\xac\x9aV%\xfa\x15%3D\xda" + + "\xefZ6\x8f\xe3\xb7%\xac\xaa\x1b\xb2\xdb\\\xeb\x0e3" + + "T\x1cWD\x1c\x8d\xc5\x18%*\xf4\x80\xa3\xb0\x0a-" + + "\x9aF/\x86\x89\x0aK\x15\xbe\x16-\xa6\xc6jd\x89" + + "\x0a+\x14\xde\x07\x06\xf0\x0c8\x91\xb1\x0e\xcf\x11\x15\xfa" + + "\x14<\xa2\xcc\x13<\x83\x04\x911\x14\xba\x1fT\xf8\x98" + + "\xc2\x93\x89\x0c\x92DF\x0e\xcb\x89\x0a#\x0a\xdf\xad\xf0" + + "6\x96A\x1b\x91\xf1'L\x10\x15v)|\x9f\xc2\xb5" + + "dF\x8d\xa8!\xe1\x12\x15J\x0a\xaf)<5?\x83" + + "\x14\x91Q\x0d\xf1\x8a\xc2\x0f(\xbc}A\x06\xedDF" + + "\x1d\xc7\x89\x0a\xbe\xc2\x8f)|\x0e2\x98Cd\x1c\xc6" + + "9\xa2\xc21\x85\xff\x03\x0cA\xb1bI\xdb\xcf\x95\xe2" + + "\x9d\xb0_\xba\x9e\xe5\xd8\xd1o\xeex\xcdR\xcb\x99\x81" + + "F\xa3M\xf3NZM4\xd2-\xd9' M\x08j" + + "\x8eS\x19\x7f\xb0\xc3\xd2\xbeY\xf60\x97\x90\xe7@W" + + "KF\x09\x0a\x0c\xc2y/\xfa\x16\xa5\x1d;WB\x1b" + + "1\xb45?\xf9\x98C\xddE\xb3\x92\xab5\x99X\xde" + + "P\xddw\xea5\xea.\x99\xbe,\x01\xc4\x00B\xe0\xd6" + + "\xed\x8d\xaeS\xdd\x0a\xe9V-\xdb\xacP\xf3\xa6\xe8T" + + "k\xae\xf4\xff\xbep" + + "\x03\x8d(\x8d\xb9O\x125W3\xa2\x8d\xa4\x8bC\xc4" + + "\xf4\x9c\x86\xd66D\xb4\xfc\xf4_\xb9\xc4\xf4u\x1aX" + + "\xf3\xdf\x00\xa2\xad\xaf/;AL_\xac\x05\x912\xd2" + + "@#\xe4 \x82(;\xea\x0e\xf3\x1bD\x10\xc9/\"" + + "\x05%\x1aD\x1eO_\xee\x87\xd4\xbb\xdb{\x9a\x8aE" + + "\xab\xf2\xc9\xf5j\xc4I+\xbe\xaaZ1\xbf\x13D\xa2" + + "\x83C\xccg\x08*\xce\x8c\x94\xa6\xc7c-\xf48\x89" + + "k\x10\x8e\x84.\xad\x1e+\xff\xf3\x9b\xfe\xcf*\x15>" + + "\xcd!.\xc4\xba\xf5\xbc\x02\xff\xcb!\x9e\x89\xa9\xf0E" + + "\xb5M.p\x88\xc9\xa6\xb0\xe9\x97O\x10\x89I\x0e\xf1" + + "vK\xd5\xf47\x95\xe1\x1b\x1c\xe2\xbd\x96\xa4\xe9\xd7\xd5" + + "\x82z\x97C\xdcd\xd0\xa4\xebF\xe4\xb5\xba\xdbR\xf0" + + "\x8aS\x1e\xb3l\xe9)]\x98\x91\x02u\xa5\x04\xa0&" + + "\xdd\xaaiK\x1b\xfeF\xd3\xaa\xd4]I\xad\xd9m$" + + "\x9d\x1b\x89\xc9\xc9#7\xdbw\x01\x00\x00\xff\xff\xd0\x91" + + "\xc3p" func init() { schemas.Register(schema_db8274f9144abc7e,