cloudflare/cloudflared

Public

mirrored from https://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2018.8.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

tunnelrpc/tunnelrpc.capnp

67lines · modecode

1using Go = import "go.capnp";
2@0xdb8274f9144abc7e;
3$Go.package("tunnelrpc");
4$Go.import("github.com/cloudflare/cloudflared/tunnelrpc");
5
6struct Authentication {
7 key @0 :Text;
8 email @1 :Text;
9 originCAKey @2 :Text;
10}
11
12struct TunnelRegistration {
13 err @0 :Text;
14 # the url to access the tunnel
15 url @1 :Text;
16 # Used to inform the client of actions taken.
17 logLines @2 :List(Text);
18 # In case of error, whether the client should attempt to reconnect.
19 permanentFailure @3 :Bool;
20 # Displayed to user
21 tunnelID @4 :Text;
22}
23
24struct RegistrationOptions {
25 # The tunnel client's unique identifier, used to verify a reconnection.
26 clientId @0 :Text;
27 # Information about the running binary.
28 version @1 :Text;
29 os @2 :Text;
30 # What to do with existing tunnels for the given hostname.
31 existingTunnelPolicy @3 :ExistingTunnelPolicy;
32 # If using the balancing policy, identifies the LB pool to use.
33 poolName @4 :Text;
34 # Client-defined tags to associate with the tunnel
35 tags @5 :List(Tag);
36 # A unique identifier for a high-availability connection made by a single client.
37 connectionId @6 :UInt8;
38 # origin LAN IP
39 originLocalIp @7 :Text;
40 # whether Argo Tunnel client has been autoupdated
41 isAutoupdated @8 :Bool;
42 # whether Argo Tunnel client is run from a terminal
43 runFromTerminal @9 :Bool;
44 # cross stream compression setting, 0 - off, 3 - high
45 compressionQuality @10 :UInt64;
46}
47
48struct Tag {
49 name @0 :Text;
50 value @1 :Text;
51}
52
53enum ExistingTunnelPolicy {
54 ignore @0;
55 disconnect @1;
56 balance @2;
57}
58
59struct ServerInfo {
60 locationName @0 :Text;
61}
62
63interface TunnelServer {
64 registerTunnel @0 (originCert :Data, hostname :Text, options :RegistrationOptions) -> (result :TunnelRegistration);
65 getServerInfo @1 () -> (result :ServerInfo);
66 unregisterTunnel @2 (gracePeriodNanoSec :Int64) -> ();
67}
68