2021-11-04 23:02:10 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
package headscale.v1;
|
2024-12-10 16:23:55 +01:00
|
|
|
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
2021-11-04 23:02:10 +01:00
|
|
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
|
|
|
// This is a potential reimplementation of Tailscale's API
|
|
|
|
// https://github.com/tailscale/tailscale/blob/main/api.md
|
|
|
|
|
|
|
|
message Latency {
|
2024-12-10 16:23:55 +01:00
|
|
|
float latency_ms = 1;
|
|
|
|
bool preferred = 2;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message ClientSupports {
|
2024-12-10 16:23:55 +01:00
|
|
|
bool hair_pinning = 1;
|
|
|
|
bool ipv6 = 2;
|
|
|
|
bool pcp = 3;
|
|
|
|
bool pmp = 4;
|
|
|
|
bool udp = 5;
|
|
|
|
bool upnp = 6;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message ClientConnectivity {
|
2024-12-10 16:23:55 +01:00
|
|
|
repeated string endpoints = 1;
|
|
|
|
string derp = 2;
|
|
|
|
bool mapping_varies_by_dest_ip = 3;
|
|
|
|
map<string, Latency> latency = 4;
|
|
|
|
ClientSupports client_supports = 5;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message GetDeviceRequest { string id = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
|
|
|
message GetDeviceResponse {
|
2024-12-10 16:23:55 +01:00
|
|
|
repeated string addresses = 1;
|
|
|
|
string id = 2;
|
|
|
|
string user = 3;
|
|
|
|
string name = 4;
|
|
|
|
string hostname = 5;
|
|
|
|
string client_version = 6;
|
|
|
|
bool update_available = 7;
|
|
|
|
string os = 8;
|
|
|
|
google.protobuf.Timestamp created = 9;
|
|
|
|
google.protobuf.Timestamp last_seen = 10;
|
|
|
|
bool key_expiry_disabled = 11;
|
|
|
|
google.protobuf.Timestamp expires = 12;
|
|
|
|
bool authorized = 13;
|
|
|
|
bool is_external = 14;
|
|
|
|
string machine_key = 15;
|
|
|
|
string node_key = 16;
|
|
|
|
bool blocks_incoming_connections = 17;
|
|
|
|
repeated string enabled_routes = 18;
|
|
|
|
repeated string advertised_routes = 19;
|
|
|
|
ClientConnectivity client_connectivity = 20;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message DeleteDeviceRequest { string id = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message DeleteDeviceResponse {}
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message GetDeviceRoutesRequest { string id = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
|
|
|
message GetDeviceRoutesResponse {
|
2024-12-10 16:23:55 +01:00
|
|
|
repeated string enabled_routes = 1;
|
|
|
|
repeated string advertised_routes = 2;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message EnableDeviceRoutesRequest {
|
2024-12-10 16:23:55 +01:00
|
|
|
string id = 1;
|
|
|
|
repeated string routes = 2;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message EnableDeviceRoutesResponse {
|
2024-12-10 16:23:55 +01:00
|
|
|
repeated string enabled_routes = 1;
|
|
|
|
repeated string advertised_routes = 2;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|