cloudflare/cloudflared

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2019.2.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

tunnelrpc/tunnelrpc.capnp

68lines · 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 uuid @11 :Text;
47}
48
49struct Tag {
50 name @0 :Text;
51 value @1 :Text;
52}
53
54enum ExistingTunnelPolicy {
55 ignore @0;
56 disconnect @1;
57 balance @2;
58}
59
60struct ServerInfo {
61 locationName @0 :Text;
62}
63
64interface TunnelServer {
65 registerTunnel @0 (originCert :Data, hostname :Text, options :RegistrationOptions) -> (result :TunnelRegistration);
66 getServerInfo @1 () -> (result :ServerInfo);
67 unregisterTunnel @2 (gracePeriodNanoSec :Int64) -> ();
68}
69