syntax = "proto3"; package burrow; import "google/protobuf/timestamp.proto"; service Tunnel { rpc TunnelConfiguration (Empty) returns (stream TunnelConfigurationResponse); rpc TunnelPackets (stream TunnelPacket) returns (stream TunnelPacket); rpc TunnelStart (Empty) returns (Empty); rpc TunnelStop (Empty) returns (Empty); rpc TunnelStatus (Empty) returns (stream TunnelStatusResponse); } service Networks { rpc NetworkAdd (Network) returns (Empty); rpc NetworkList (Empty) returns (stream NetworkListResponse); rpc NetworkReorder (NetworkReorderRequest) returns (Empty); rpc NetworkDelete (NetworkDeleteRequest) returns (Empty); } service TailnetControl { rpc Discover (TailnetDiscoverRequest) returns (TailnetDiscoverResponse); rpc Probe (TailnetProbeRequest) returns (TailnetProbeResponse); rpc LoginStart (TailnetLoginStartRequest) returns (TailnetLoginStatusResponse); rpc LoginStatus (TailnetLoginStatusRequest) returns (TailnetLoginStatusResponse); rpc LoginCancel (TailnetLoginCancelRequest) returns (Empty); } service ProxySubscriptions { rpc PreviewImport (ProxySubscriptionImportRequest) returns (ProxySubscriptionPreviewResponse); rpc ApplyImport (ProxySubscriptionApplyRequest) returns (ProxySubscriptionApplyResponse); rpc SelectNode (ProxySubscriptionSelectRequest) returns (ProxySubscriptionSelectResponse); } message NetworkReorderRequest { int32 id = 1; int32 index = 2; } message WireGuardPeer { string endpoint = 1; repeated string subnet = 2; } message WireGuardNetwork { string address = 1; string dns = 2; repeated WireGuardPeer peer = 3; } message NetworkDeleteRequest { int32 id = 1; } message Network { int32 id = 1; NetworkType type = 2; bytes payload = 3; } enum NetworkType { WireGuard = 0; Tailnet = 1; Trojan = 2; ProxySubscription = 3; } message ProxySubscriptionImportRequest { string url = 1; } message ProxySubscriptionRejectedEntry { int32 ordinal = 1; string reason = 2; string scheme = 3; } message ProxySubscriptionNodePreview { int32 ordinal = 1; string name = 2; string protocol = 3; string server = 4; int32 port = 5; repeated string warnings = 6; bool runtime_supported = 7; } message ProxySubscriptionPreviewResponse { string suggested_name = 1; string detected_format = 2; int32 compatible_count = 3; int32 rejected_count = 4; repeated ProxySubscriptionNodePreview node = 5; repeated ProxySubscriptionRejectedEntry rejected = 6; repeated string warnings = 7; } message ProxySubscriptionApplyRequest { int32 id = 1; string url = 2; string name = 3; int32 selected_ordinal = 4; } message ProxySubscriptionApplyResponse { int32 id = 1; int32 imported_count = 2; int32 selected_ordinal = 3; } message ProxySubscriptionSelectRequest { int32 id = 1; int32 selected_ordinal = 2; } message ProxySubscriptionSelectResponse { int32 id = 1; int32 selected_ordinal = 2; } message NetworkListResponse { repeated Network network = 1; } message Empty { } message TailnetDiscoverRequest { string email = 1; } message TailnetDiscoverResponse { string domain = 1; string authority = 2; string oidc_issuer = 3; bool managed = 4; } message TailnetProbeRequest { string authority = 1; } message TailnetProbeResponse { string authority = 1; int32 status_code = 2; string summary = 3; string detail = 4; bool reachable = 5; } message TailnetLoginStartRequest { string account_name = 1; string identity_name = 2; string hostname = 3; string authority = 4; } message TailnetLoginStatusRequest { string session_id = 1; } message TailnetLoginCancelRequest { string session_id = 1; } message TailnetLoginStatusResponse { string session_id = 1; string backend_state = 2; string auth_url = 3; bool running = 4; bool needs_login = 5; string tailnet_name = 6; string magic_dns_suffix = 7; string self_dns_name = 8; repeated string tailnet_ips = 9; repeated string health = 10; } enum State { Stopped = 0; Running = 1; } message TunnelStatusResponse { State state = 1; optional google.protobuf.Timestamp start = 2; } message TunnelConfigurationResponse { repeated string addresses = 1; int32 mtu = 2; repeated string routes = 3; repeated string dns_servers = 4; repeated string search_domains = 5; bool include_default_route = 6; repeated string excluded_routes = 7; } message TunnelPacket { bytes payload = 1; }