[release] v0.10.0-unstable10

This commit is contained in:
Yann Stepienik 2023-08-28 10:55:19 +01:00
parent 0142c6fb11
commit 0479504558
5 changed files with 9 additions and 9 deletions

View file

@ -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;

View file

@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.10.0-unstable9",
"version": "0.10.0-unstable10",
"description": "",
"main": "test-server.js",
"bugs": {

View file

@ -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
}

View file

@ -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

View file

@ -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")
}