feat: custom hostname

This commit is contained in:
m1m1sha
2024-05-08 14:47:22 +08:00
parent c3df9ea7fa
commit 0498b55d39
10 changed files with 91 additions and 8 deletions
+2
View File
@@ -42,6 +42,7 @@ struct NetworkConfig {
instance_id: String,
virtual_ipv4: String,
hostname: Option<String>,
network_name: String,
network_secret: String,
networking_method: NetworkingMethod,
@@ -70,6 +71,7 @@ impl NetworkConfig {
.parse()
.with_context(|| format!("failed to parse instance id: {}", self.instance_id))?,
);
cfg.set_hostname(self.hostname.clone());
cfg.set_inst_name(self.network_name.clone());
cfg.set_network_identity(NetworkIdentity::new(
self.network_name.clone(),