mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-01-05 11:49:50 -06:00
[release] v0.10.0-unstable10
This commit is contained in:
@@ -21,7 +21,7 @@ const AddDeviceModal = ({ users, config, isAdmin, refreshConfig, devices }) => {
|
||||
const [isDone, setIsDone] = useState(null);
|
||||
const canvasRef = React.useRef(null);
|
||||
|
||||
let firstIP = "192.168.201.1/24";
|
||||
let firstIP = "192.168.201.2/24";
|
||||
if (devices && devices.length > 0) {
|
||||
const isIpFree = (ip) => {
|
||||
return devices.filter((d) => d.ip === ip).length === 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.10.0-unstable9",
|
||||
"version": "0.10.0-unstable10",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
||||
@@ -94,8 +94,8 @@ func handleDNSRequest(w dns.ResponseWriter, r *dns.Msg) {
|
||||
utils.Debug("DNS Question " + q.Name)
|
||||
for _, hostname := range hostnames {
|
||||
if strings.HasSuffix(q.Name, hostname + ".") && q.Qtype == dns.TypeA {
|
||||
utils.Debug("DNS Overwrite " + hostname + " with 192.168.201.0")
|
||||
rr, _ := dns.NewRR(q.Name + " A 192.168.201.0")
|
||||
utils.Debug("DNS Overwrite " + hostname + " with 192.168.201.1")
|
||||
rr, _ := dns.NewRR(q.Name + " A 192.168.201.1")
|
||||
m.Answer = append(m.Answer, rr)
|
||||
customHandled = true
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func Init() {
|
||||
if _, err := os.Stat(utils.CONFIGFOLDER + "cosmos.crt"); os.IsNotExist(err) {
|
||||
utils.Log("Constellation: cosmos.crt not found, generating...")
|
||||
// generate cosmos.crt
|
||||
generateNebulaCert("cosmos", "192.168.201.0/24", "", true)
|
||||
generateNebulaCert("cosmos", "192.168.201.1/24", "", true)
|
||||
}
|
||||
|
||||
// export nebula.yml
|
||||
|
||||
@@ -85,7 +85,7 @@ func ExportConfigToYAML(overwriteConfig utils.ConstellationConfig, outputPath st
|
||||
finalConfig := NebulaDefaultConfig
|
||||
|
||||
finalConfig.StaticHostMap = map[string][]string{
|
||||
"192.168.201.0": []string{
|
||||
"192.168.201.1": []string{
|
||||
"lighthouse-cosmos.constellation:4242",
|
||||
utils.GetMainConfig().HTTPConfig.Hostname + ":4242",
|
||||
},
|
||||
@@ -136,7 +136,7 @@ func getYAMLClientConfig(name, configPath string) (string, error) {
|
||||
}
|
||||
|
||||
if staticHostMap, ok := configMap["static_host_map"].(map[interface{}]interface{}); ok {
|
||||
staticHostMap["192.168.201.0"] = []string{
|
||||
staticHostMap["192.168.201.1"] = []string{
|
||||
"lighthouse-cosmos.constellation:4242",
|
||||
utils.GetMainConfig().HTTPConfig.Hostname + ":4242",
|
||||
}
|
||||
@@ -149,7 +149,7 @@ func getYAMLClientConfig(name, configPath string) (string, error) {
|
||||
lighthouseMap["am_lighthouse"] = false
|
||||
|
||||
lighthouseMap["hosts"] = []string{
|
||||
"192.168.201.0",
|
||||
"192.168.201.1",
|
||||
}
|
||||
} else {
|
||||
return "", errors.New("lighthouse not found in nebula.yml")
|
||||
@@ -165,7 +165,7 @@ func getYAMLClientConfig(name, configPath string) (string, error) {
|
||||
|
||||
if relayMap, ok := configMap["relay"].(map[interface{}]interface{}); ok {
|
||||
relayMap["am_relay"] = false
|
||||
relayMap["relays"] = []string{"192.168.201.0"}
|
||||
relayMap["relays"] = []string{"192.168.201.1"}
|
||||
} else {
|
||||
return "", errors.New("relay not found in nebula.yml")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user