2021-11-04 23:02:10 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
package headscale.v1;
|
|
|
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
import "headscale/v1/preauthkey.proto";
|
2024-02-18 23:22:07 +01:00
|
|
|
import "headscale/v1/user.proto";
|
|
|
|
|
|
|
|
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
2021-11-04 23:02:10 +01:00
|
|
|
|
|
|
|
enum RegisterMethod {
|
2024-12-10 16:23:55 +01:00
|
|
|
REGISTER_METHOD_UNSPECIFIED = 0;
|
|
|
|
REGISTER_METHOD_AUTH_KEY = 1;
|
|
|
|
REGISTER_METHOD_CLI = 2;
|
|
|
|
REGISTER_METHOD_OIDC = 3;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
2023-09-24 13:42:05 +02:00
|
|
|
message Node {
|
2024-12-10 16:23:55 +01:00
|
|
|
// 9: removal of last_successful_update
|
|
|
|
reserved 9;
|
2024-02-18 23:22:07 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
uint64 id = 1;
|
|
|
|
string machine_key = 2;
|
|
|
|
string node_key = 3;
|
|
|
|
string disco_key = 4;
|
|
|
|
repeated string ip_addresses = 5;
|
|
|
|
string name = 6;
|
|
|
|
User user = 7;
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
google.protobuf.Timestamp last_seen = 8;
|
|
|
|
google.protobuf.Timestamp expiry = 10;
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
PreAuthKey pre_auth_key = 11;
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
google.protobuf.Timestamp created_at = 12;
|
2022-02-28 23:21:06 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
RegisterMethod register_method = 13;
|
2022-04-15 13:11:41 +02:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
reserved 14 to 17;
|
|
|
|
// google.protobuf.Timestamp updated_at = 14;
|
|
|
|
// google.protobuf.Timestamp deleted_at = 15;
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
// bytes host_info = 15;
|
|
|
|
// bytes endpoints = 16;
|
|
|
|
// bytes enabled_routes = 17;
|
2022-03-13 22:03:20 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
repeated string forced_tags = 18;
|
|
|
|
repeated string invalid_tags = 19;
|
|
|
|
repeated string valid_tags = 20;
|
|
|
|
string given_name = 21;
|
|
|
|
bool online = 22;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
2023-09-24 13:42:05 +02:00
|
|
|
message RegisterNodeRequest {
|
2024-12-10 16:23:55 +01:00
|
|
|
string user = 1;
|
|
|
|
string key = 2;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message RegisterNodeResponse { Node node = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message GetNodeRequest { uint64 node_id = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message GetNodeResponse { Node node = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2022-04-25 20:45:07 +02:00
|
|
|
message SetTagsRequest {
|
2024-12-10 16:23:55 +01:00
|
|
|
uint64 node_id = 1;
|
|
|
|
repeated string tags = 2;
|
2022-04-15 13:11:41 +02:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message SetTagsResponse { Node node = 1; }
|
2022-04-15 13:11:41 +02:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message DeleteNodeRequest { uint64 node_id = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-02-18 23:22:07 +01:00
|
|
|
message DeleteNodeResponse {}
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message ExpireNodeRequest { uint64 node_id = 1; }
|
2021-11-21 14:40:04 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message ExpireNodeResponse { Node node = 1; }
|
2021-11-21 14:40:04 +01:00
|
|
|
|
2023-09-24 13:42:05 +02:00
|
|
|
message RenameNodeRequest {
|
2024-12-10 16:23:55 +01:00
|
|
|
uint64 node_id = 1;
|
|
|
|
string new_name = 2;
|
2022-03-13 22:03:20 +01:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message RenameNodeResponse { Node node = 1; }
|
2022-03-13 22:03:20 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message ListNodesRequest { string user = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message ListNodesResponse { repeated Node nodes = 1; }
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2023-09-24 13:42:05 +02:00
|
|
|
message MoveNodeRequest {
|
2024-12-10 16:23:55 +01:00
|
|
|
uint64 node_id = 1;
|
|
|
|
string user = 2;
|
2022-05-01 15:34:40 +02:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message MoveNodeResponse { Node node = 1; }
|
2022-05-01 15:34:40 +02:00
|
|
|
|
2023-09-24 13:42:05 +02:00
|
|
|
message DebugCreateNodeRequest {
|
2024-12-10 16:23:55 +01:00
|
|
|
string user = 1;
|
|
|
|
string key = 2;
|
|
|
|
string name = 3;
|
|
|
|
repeated string routes = 4;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message DebugCreateNodeResponse { Node node = 1; }
|
2024-04-17 07:03:06 +02:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message BackfillNodeIPsRequest { bool confirmed = 1; }
|
2024-04-17 07:03:06 +02:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message BackfillNodeIPsResponse { repeated string changes = 1; }
|