code_before
stringlengths 16
1.81M
| edits
stringlengths 4
328k
| next_edit
stringlengths 0
76.5k
| code_after
stringlengths 3
49.9M
| label_window
sequencelengths 4
1.81k
| instruction
stringlengths 20
51.9k
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|---|---|---|---|
}
}
}
newconfig.TLSv12Roots = Context.tlsRoots
newconfig.TLSCiphers = Context.tlsCiphers
newconfig.TLSAllowUnencryptedDOH = tlsConf.AllowUnencryptedDOH
| </s> remove IP: net.ParseIP(config.DNS.BindHost),
</s> add IP: bindHost, </s> remove return newconfig
</s> add return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil </s> remove dnsConfig := generateServerConfig()
</s> add dnsConfig, err := generateServerConfig()
if err != nil {
closeDNSServer()
return fmt.Errorf("generateServerConfig: %w", err)
}
</s> remove IP: net.ParseIP(config.DNS.BindHost),
</s> add IP: bindHost, | if tlsConf.PortDNSCrypt != 0 {
newconfig.DNSCryptConfig, err = newDNSCrypt(bindHost, tlsConf)
if err != nil {
// Don't wrap the error, because it's already
// wrapped by newDNSCrypt.
return dnsforward.ServerConfig{}, err
}
} | }
}
if tlsConf.PortDNSCrypt != 0 {
newconfig.DNSCryptConfig, err = newDNSCrypt(bindHost, tlsConf)
if err != nil {
// Don't wrap the error, because it's already
// wrapped by newDNSCrypt.
return dnsforward.ServerConfig{}, err
}
}
}
newconfig.TLSv12Roots = Context.tlsRoots
newconfig.TLSCiphers = Context.tlsCiphers
newconfig.TLSAllowUnencryptedDOH = tlsConf.AllowUnencryptedDOH
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
newconfig.TLSAllowUnencryptedDOH = tlsConf.AllowUnencryptedDOH
newconfig.FilterHandler = applyAdditionalFiltering
newconfig.GetCustomUpstreamByClient = Context.clients.FindUpstreams
return newconfig
}
type dnsEncryption struct {
https string
tls string
| </s> remove func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
</s> add func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig() </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) | return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil | newconfig.TLSAllowUnencryptedDOH = tlsConf.AllowUnencryptedDOH
newconfig.FilterHandler = applyAdditionalFiltering
newconfig.GetCustomUpstreamByClient = Context.clients.FindUpstreams
return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil
}
type dnsEncryption struct {
https string
tls string | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
return nil
}
func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
}
return nil
| </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) </s> remove dnsConfig := generateServerConfig()
</s> add dnsConfig, err := generateServerConfig()
if err != nil {
closeDNSServer()
return fmt.Errorf("generateServerConfig: %w", err)
}
</s> remove return newconfig
</s> add return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil </s> remove func generateServerConfig() dnsforward.ServerConfig {
newconfig := dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
</s> add func generateServerConfig() (newconfig dnsforward.ServerConfig, err error) {
bindHost := net.ParseIP(config.DNS.BindHost)
newconfig = dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port}, | func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig() |
return nil
}
func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig()
func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig()
func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig()
if err != nil {
return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
}
return nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
}
return nil
}
| </s> remove func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
</s> add func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig() </s> remove dnsConfig := generateServerConfig()
</s> add dnsConfig, err := generateServerConfig()
if err != nil {
closeDNSServer()
return fmt.Errorf("generateServerConfig: %w", err)
}
</s> remove return newconfig
</s> add return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil </s> remove func generateServerConfig() dnsforward.ServerConfig {
newconfig := dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
</s> add func generateServerConfig() (newconfig dnsforward.ServerConfig, err error) {
bindHost := net.ParseIP(config.DNS.BindHost)
newconfig = dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port}, | return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) | func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err)
}
return nil
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
dispatch(getVersion());
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(initSettingsFailure());
}
};
export const enableDnsRequest = createAction('ENABLE_DNS_REQUEST');
export const enableDnsFailure = createAction('ENABLE_DNS_FAILURE');
| </s> remove dispatch(setUpstreamSuccess());
</s> add dispatch(setUpstreamSuccess(config)); </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove const {
processing,
processingSet,
...values
} = access;
</s> add const { processing, processingSet, ...values } = access; </s> remove [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
</s> add [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
}, </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, | dispatch(dnsStatusFailure());
}
};
export const getDnsSettingsRequest = createAction('GET_DNS_SETTINGS_REQUEST');
export const getDnsSettingsFailure = createAction('GET_DNS_SETTINGS_FAILURE');
export const getDnsSettingsSuccess = createAction('GET_DNS_SETTINGS_SUCCESS');
export const getDnsSettings = () => async (dispatch) => {
dispatch(getDnsSettingsRequest());
try {
const dnsStatus = await apiClient.getGlobalStatus();
dispatch(getDnsSettingsSuccess(dnsStatus));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getDnsSettingsFailure()); | dispatch(getVersion());
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(dnsStatusFailure());
}
};
export const getDnsSettingsRequest = createAction('GET_DNS_SETTINGS_REQUEST');
export const getDnsSettingsFailure = createAction('GET_DNS_SETTINGS_FAILURE');
export const getDnsSettingsSuccess = createAction('GET_DNS_SETTINGS_SUCCESS');
export const getDnsSettings = () => async (dispatch) => {
dispatch(getDnsSettingsRequest());
try {
const dnsStatus = await apiClient.getGlobalStatus();
dispatch(getDnsSettingsSuccess(dnsStatus));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getDnsSettingsFailure());
}
};
export const enableDnsRequest = createAction('ENABLE_DNS_REQUEST');
export const enableDnsFailure = createAction('ENABLE_DNS_FAILURE'); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/actions/index.js |
) || [];
await apiClient.setUpstream(values);
dispatch(addSuccessToast('updated_upstream_dns_toast'));
dispatch(setUpstreamSuccess());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setUpstreamFailure());
}
};
| </s> remove dispatch(initSettingsFailure());
</s> add dispatch(dnsStatusFailure());
}
};
export const getDnsSettingsRequest = createAction('GET_DNS_SETTINGS_REQUEST');
export const getDnsSettingsFailure = createAction('GET_DNS_SETTINGS_FAILURE');
export const getDnsSettingsSuccess = createAction('GET_DNS_SETTINGS_SUCCESS');
export const getDnsSettings = () => async (dispatch) => {
dispatch(getDnsSettingsRequest());
try {
const dnsStatus = await apiClient.getGlobalStatus();
dispatch(getDnsSettingsSuccess(dnsStatus));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getDnsSettingsFailure()); </s> remove [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const {
ip, mac, hostname,
} = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
</s> add [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
}, </s> remove [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
</s> add return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, </s> remove }
</s> add }, | dispatch(setUpstreamSuccess(config)); | ) || [];
await apiClient.setUpstream(values);
dispatch(addSuccessToast('updated_upstream_dns_toast'));
dispatch(setUpstreamSuccess(config));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setUpstreamFailure());
}
}; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/actions/index.js |
import { Trans, withNamespaces } from 'react-i18next';
import flow from 'lodash/flow';
const Form = (props) => {
const { handleSubmit, submitting, invalid } = props;
return (
<form onSubmit={handleSubmit}>
<div className="form__group mb-5">
<label className="form__label form__label--with-desc" htmlFor="allowed_clients">
| </s> remove import { handleUpstreamChange, setUpstream, testUpstream } from '../actions';
</s> add import { handleUpstreamChange, setUpstream, testUpstream, getDnsSettings } from '../actions'; </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove const {
processing,
processingSet,
...values
} = access;
</s> add const { processing, processingSet, ...values } = access; | const {
handleSubmit, submitting, invalid, processingSet,
} = props; | import { Trans, withNamespaces } from 'react-i18next';
import flow from 'lodash/flow';
const Form = (props) => {
const {
handleSubmit, submitting, invalid, processingSet,
} = props;
return (
<form onSubmit={handleSubmit}>
<div className="form__group mb-5">
<label className="form__label form__label--with-desc" htmlFor="allowed_clients"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
type="text"
className="form-control form-control--textarea"
/>
</div>
<div className="form__group mb-5">
<label className="form__label form__label--with-desc" htmlFor="disallowed_clients">
| </s> remove <label className="form__label form__label--with-desc" htmlFor="bootstrap_dns">
</s> add <label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
> </s> remove const { handleSubmit, submitting, invalid } = props;
</s> add const {
handleSubmit, submitting, invalid, processingSet,
} = props; | disabled={processingSet} | type="text"
className="form-control form-control--textarea"
disabled={processingSet}
/>
</div>
<div className="form__group mb-5">
<label className="form__label form__label--with-desc" htmlFor="disallowed_clients"> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
name="disallowed_clients"
component="textarea"
type="text"
className="form-control form-control--textarea"
/>
</div>
<div className="form__group mb-5">
<label className="form__label form__label--with-desc" htmlFor="blocked_hosts">
| </s> remove <label className="form__label form__label--with-desc" htmlFor="bootstrap_dns">
</s> add <label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
> | disabled={processingSet} | name="disallowed_clients"
component="textarea"
type="text"
className="form-control form-control--textarea"
disabled={processingSet}
/>
</div>
<div className="form__group mb-5">
<label className="form__label form__label--with-desc" htmlFor="blocked_hosts"> | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
type="text"
className="form-control form-control--textarea"
/>
</div>
<div className="card-actions">
<div className="btn-list">
<button
| </s> remove disabled={submitting || invalid}
</s> add disabled={submitting || invalid || processingSet} | disabled={processingSet} | type="text"
className="form-control form-control--textarea"
disabled={processingSet}
/>
</div>
<div className="card-actions">
<div className="btn-list">
<button | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
<div className="btn-list">
<button
type="submit"
className="btn btn-success btn-standard"
disabled={submitting || invalid}
>
<Trans>save_config</Trans>
</button>
</div>
</div>
| </s> remove <label className="form__label form__label--with-desc" htmlFor="bootstrap_dns">
</s> add <label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
> | disabled={submitting || invalid || processingSet} | <div className="btn-list">
<button
type="submit"
className="btn btn-success btn-standard"
disabled={submitting || invalid || processingSet}
>
<Trans>save_config</Trans>
</button>
</div>
</div> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
);
};
Form.propTypes = {
handleSubmit: PropTypes.func,
submitting: PropTypes.bool,
invalid: PropTypes.bool,
initialValues: PropTypes.object,
t: PropTypes.func,
};
export default flow([withNamespaces(), reduxForm({ form: 'accessForm' })])(Form);
| </s> remove check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
});
</s> add ); </s> remove dispatch(initSettingsFailure());
</s> add dispatch(dnsStatusFailure());
}
};
export const getDnsSettingsRequest = createAction('GET_DNS_SETTINGS_REQUEST');
export const getDnsSettingsFailure = createAction('GET_DNS_SETTINGS_FAILURE');
export const getDnsSettingsSuccess = createAction('GET_DNS_SETTINGS_SUCCESS');
export const getDnsSettings = () => async (dispatch) => {
dispatch(getDnsSettingsRequest());
try {
const dnsStatus = await apiClient.getGlobalStatus();
dispatch(getDnsSettingsSuccess(dnsStatus));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getDnsSettingsFailure()); </s> remove [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
</s> add [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
}, | handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired, | );
};
Form.propTypes = {
handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired,
handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired,
handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired,
handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired,
handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired,
};
export default flow([withNamespaces(), reduxForm({ form: 'accessForm' })])(Form); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
render() {
const { t, access } = this.props;
const {
processing,
processingSet,
...values
} = access;
return (
<Card
title={t('access_title')}
subtitle={t('access_desc')}
| </s> remove const { handleSubmit, submitting, invalid } = props;
</s> add const {
handleSubmit, submitting, invalid, processingSet,
} = props; </s> remove const dhcp = handleActions({
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const {
static_leases: staticLeases,
...values
} = payload;
</s> add const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload; </s> remove const newState = {
...state,
staticLeases,
processing: false,
...values,
};
</s> add const newState = {
...state,
staticLeases,
processing: false,
...values,
}; </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; | const { processing, processingSet, ...values } = access; |
render() {
const { t, access } = this.props;
const { processing, processingSet, ...values } = access;
const { processing, processingSet, ...values } = access;
const { processing, processingSet, ...values } = access;
const { processing, processingSet, ...values } = access;
const { processing, processingSet, ...values } = access;
return (
<Card
title={t('access_title')}
subtitle={t('access_desc')} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/index.js |
<Form
initialValues={values}
onSubmit={this.handleFormSubmit}
/>
</Card>
);
}
| </s> remove check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
});
</s> add ); </s> remove handleSubmit: PropTypes.func,
submitting: PropTypes.bool,
invalid: PropTypes.bool,
initialValues: PropTypes.object,
t: PropTypes.func,
</s> add handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired, | processingSet={processingSet} | <Form
initialValues={values}
onSubmit={this.handleFormSubmit}
processingSet={processingSet}
/>
</Card>
);
} | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/index.js |
className="form-control form-control--textarea"
placeholder={t('upstream_dns')}
/>
</div>
</div>
<div className="col-12">
<div className="form__group form__group--settings">
| </s> remove <label className="form__label form__label--with-desc" htmlFor="bootstrap_dns">
</s> add <label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
> | disabled={processingSetUpstream || processingTestUpstream} | className="form-control form-control--textarea"
placeholder={t('upstream_dns')}
disabled={processingSetUpstream || processingTestUpstream}
/>
</div>
</div>
<div className="col-12">
<div className="form__group form__group--settings"> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
type="checkbox"
component={renderSelectField}
placeholder={t('upstream_parallel')}
/>
</div>
</div>
<div className="col-12">
<Examples />
| </s> remove <label className="form__label form__label--with-desc" htmlFor="bootstrap_dns">
</s> add <label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
> | disabled={processingSetUpstream} | type="checkbox"
component={renderSelectField}
placeholder={t('upstream_parallel')}
disabled={processingSetUpstream}
/>
</div>
</div>
<div className="col-12">
<Examples /> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
<hr />
</div>
<div className="col-12">
<div className="form__group">
<label className="form__label form__label--with-desc" htmlFor="bootstrap_dns">
<Trans>bootstrap_dns</Trans>
</label>
<div className="form__desc form__desc--top">
<Trans>bootstrap_dns_desc</Trans>
</div>
| </s> | <label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
> | <hr />
</div>
<div className="col-12">
<div className="form__group">
<label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
>
<Trans>bootstrap_dns</Trans>
</label>
<div className="form__desc form__desc--top">
<Trans>bootstrap_dns_desc</Trans>
</div> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
id="bootstrap_dns"
name="bootstrap_dns"
component="textarea"
type="text"
className="form-control"
placeholder={t('bootstrap_dns')}
/>
</div>
</div>
</div>
| </s> | className="form-control form-control--textarea form-control--textarea-small" | id="bootstrap_dns"
name="bootstrap_dns"
component="textarea"
type="text"
className="form-control form-control--textarea form-control--textarea-small"
placeholder={t('bootstrap_dns')}
/>
</div>
</div>
</div> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
component="textarea"
type="text"
className="form-control form-control--textarea form-control--textarea-small"
placeholder={t('bootstrap_dns')}
/>
</div>
</div>
</div>
| </s> remove className="form-control"
</s> add className="form-control form-control--textarea form-control--textarea-small" | disabled={processingSetUpstream} | component="textarea"
type="text"
className="form-control form-control--textarea form-control--textarea-small"
placeholder={t('bootstrap_dns')}
disabled={processingSetUpstream}
/>
</div>
</div>
</div> | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
class Dns extends Component {
componentDidMount() {
this.props.getAccessList();
this.props.getRewritesList();
}
| </s> remove import { handleUpstreamChange, setUpstream, testUpstream } from '../actions';
</s> add import { handleUpstreamChange, setUpstream, testUpstream, getDnsSettings } from '../actions'; </s> remove const {
processing,
processingSet,
...values
} = access;
</s> add const { processing, processingSet, ...values } = access; </s> remove const { handleSubmit, submitting, invalid } = props;
</s> add const {
handleSubmit, submitting, invalid, processingSet,
} = props; </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; | this.props.getDnsSettings(); |
class Dns extends Component {
componentDidMount() {
this.props.getDnsSettings();
this.props.getAccessList();
this.props.getRewritesList();
}
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/index.js |
toggleRewritesModal,
} = this.props;
return (
<Fragment>
<PageTitle title={t('dns_settings')} />
{isDataLoading && <Loading />}
{isDataReady && (
<Fragment>
| </s> remove {(dashboard.processing || access.processing) && <Loading />}
{!dashboard.processing && !access.processing && (
</s> add {isDataLoading && <Loading />}
{isDataReady && ( </s> remove const {
processing,
processingSet,
...values
} = access;
</s> add const { processing, processingSet, ...values } = access; </s> remove const { handleSubmit, submitting, invalid } = props;
</s> add const {
handleSubmit, submitting, invalid, processingSet,
} = props; </s> remove [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
</s> add return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, </s> remove announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
</s> add version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort, | const isDataLoading =
dashboard.processingDnsSettings || access.processing || rewrites.processing;
const isDataReady =
!dashboard.processingDnsSettings && !access.processing && !rewrites.processing;
| toggleRewritesModal,
} = this.props;
const isDataLoading =
dashboard.processingDnsSettings || access.processing || rewrites.processing;
const isDataReady =
!dashboard.processingDnsSettings && !access.processing && !rewrites.processing;
return (
<Fragment>
<PageTitle title={t('dns_settings')} />
{isDataLoading && <Loading />}
{isDataReady && (
<Fragment> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/index.js |
return (
<Fragment>
<PageTitle title={t('dns_settings')} />
{(dashboard.processing || access.processing) && <Loading />}
{!dashboard.processing && !access.processing && (
<Fragment>
<Upstream
upstreamDns={dashboard.upstreamDns}
bootstrapDns={dashboard.bootstrapDns}
allServers={dashboard.allServers}
| </s> remove [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
</s> add return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, </s> remove const {
processing,
processingSet,
...values
} = access;
</s> add const { processing, processingSet, ...values } = access; </s> remove announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
</s> add version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort, </s> remove const { handleSubmit, submitting, invalid } = props;
</s> add const {
handleSubmit, submitting, invalid, processingSet,
} = props; | {isDataLoading && <Loading />}
{isDataReady && ( |
return (
<Fragment>
<PageTitle title={t('dns_settings')} />
{isDataLoading && <Loading />}
{isDataReady && (
{isDataLoading && <Loading />}
{isDataReady && (
<Fragment>
<Upstream
upstreamDns={dashboard.upstreamDns}
bootstrapDns={dashboard.bootstrapDns}
allServers={dashboard.allServers} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/index.js |
addRewrite: PropTypes.func.isRequired,
deleteRewrite: PropTypes.func.isRequired,
toggleRewritesModal: PropTypes.func.isRequired,
t: PropTypes.func.isRequired,
};
export default withNamespaces()(Dns);
| </s> remove handleSubmit: PropTypes.func,
submitting: PropTypes.bool,
invalid: PropTypes.bool,
initialValues: PropTypes.object,
t: PropTypes.func,
</s> add handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired, </s> remove check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
});
</s> add ); </s> remove dispatch(initSettingsFailure());
</s> add dispatch(dnsStatusFailure());
}
};
export const getDnsSettingsRequest = createAction('GET_DNS_SETTINGS_REQUEST');
export const getDnsSettingsFailure = createAction('GET_DNS_SETTINGS_FAILURE');
export const getDnsSettingsSuccess = createAction('GET_DNS_SETTINGS_SUCCESS');
export const getDnsSettings = () => async (dispatch) => {
dispatch(getDnsSettingsRequest());
try {
const dnsStatus = await apiClient.getGlobalStatus();
dispatch(getDnsSettingsSuccess(dnsStatus));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getDnsSettingsFailure()); </s> remove }
</s> add }, | getDnsSettings: PropTypes.func.isRequired, | addRewrite: PropTypes.func.isRequired,
deleteRewrite: PropTypes.func.isRequired,
toggleRewritesModal: PropTypes.func.isRequired,
getDnsSettings: PropTypes.func.isRequired,
t: PropTypes.func.isRequired,
};
export default withNamespaces()(Dns); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/index.js |
.form-control--textarea {
min-height: 110px;
}
.form-control--textarea-large {
min-height: 240px;
}
| </s> remove import { handleUpstreamChange, setUpstream, testUpstream } from '../actions';
</s> add import { handleUpstreamChange, setUpstream, testUpstream, getDnsSettings } from '../actions'; </s> remove const {
processing,
processingSet,
...values
} = access;
</s> add const { processing, processingSet, ...values } = access; </s> remove const { handleSubmit, submitting, invalid } = props;
</s> add const {
handleSubmit, submitting, invalid, processingSet,
} = props; </s> remove dispatch(initSettingsFailure());
</s> add dispatch(dnsStatusFailure());
}
};
export const getDnsSettingsRequest = createAction('GET_DNS_SETTINGS_REQUEST');
export const getDnsSettingsFailure = createAction('GET_DNS_SETTINGS_FAILURE');
export const getDnsSettingsSuccess = createAction('GET_DNS_SETTINGS_SUCCESS');
export const getDnsSettings = () => async (dispatch) => {
dispatch(getDnsSettingsRequest());
try {
const dnsStatus = await apiClient.getGlobalStatus();
dispatch(getDnsSettingsSuccess(dnsStatus));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getDnsSettingsFailure()); | transition: 0.3s ease-in-out background-color;
}
.form-control--textarea-small {
min-height: 90px; |
.form-control--textarea {
min-height: 110px;
transition: 0.3s ease-in-out background-color;
}
.form-control--textarea-small {
min-height: 90px;
}
.form-control--textarea-large {
min-height: 240px;
}
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Settings.css |
import { connect } from 'react-redux';
import { handleUpstreamChange, setUpstream, testUpstream } from '../actions';
import { getAccessList, setAccessList } from '../actions/access';
import {
getRewritesList,
addRewrite,
deleteRewrite,
| </s> remove const { handleSubmit, submitting, invalid } = props;
</s> add const {
handleSubmit, submitting, invalid, processingSet,
} = props; </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove const {
processing,
processingSet,
...values
} = access;
</s> add const { processing, processingSet, ...values } = access; | import { handleUpstreamChange, setUpstream, testUpstream, getDnsSettings } from '../actions'; | import { connect } from 'react-redux';
import { handleUpstreamChange, setUpstream, testUpstream, getDnsSettings } from '../actions';
import { getAccessList, setAccessList } from '../actions/access';
import {
getRewritesList,
addRewrite,
deleteRewrite, | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/containers/Dns.js |
getRewritesList,
addRewrite,
deleteRewrite,
toggleRewritesModal,
};
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Dns);
| </s> remove import { handleUpstreamChange, setUpstream, testUpstream } from '../actions';
</s> add import { handleUpstreamChange, setUpstream, testUpstream, getDnsSettings } from '../actions'; </s> remove handleSubmit: PropTypes.func,
submitting: PropTypes.bool,
invalid: PropTypes.bool,
initialValues: PropTypes.object,
t: PropTypes.func,
</s> add handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired, </s> remove check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
});
</s> add ); </s> remove dispatch(initSettingsFailure());
</s> add dispatch(dnsStatusFailure());
}
};
export const getDnsSettingsRequest = createAction('GET_DNS_SETTINGS_REQUEST');
export const getDnsSettingsFailure = createAction('GET_DNS_SETTINGS_FAILURE');
export const getDnsSettingsSuccess = createAction('GET_DNS_SETTINGS_SUCCESS');
export const getDnsSettings = () => async (dispatch) => {
dispatch(getDnsSettingsRequest());
try {
const dnsStatus = await apiClient.getGlobalStatus();
dispatch(getDnsSettingsSuccess(dnsStatus));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getDnsSettingsFailure()); | getDnsSettings, | getRewritesList,
addRewrite,
deleteRewrite,
toggleRewritesModal,
getDnsSettings,
};
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Dns); | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/containers/Dns.js |
import stats from './stats';
import queryLogs from './queryLogs';
import filtering from './filtering';
const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
}, {
| </s> remove [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
}, {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
});
</s> add const setting = settingsList[settingKey]; </s> remove const dashboard = handleActions({
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const {
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
} = payload;
const newState = {
</s> add const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({ </s> remove [actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }), </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, | const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; | import stats from './stats';
import queryLogs from './queryLogs';
import filtering from './filtering';
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
}, { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
}, {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
});
const dashboard = handleActions({
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
| </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove [actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }), </s> remove const dashboard = handleActions({
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const {
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
} = payload;
const newState = {
</s> add const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({ </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, | const setting = settingsList[settingKey]; | [actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const setting = settingsList[settingKey];
const dashboard = handleActions({
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
processingDhcpStatus: false,
settingsList: {},
});
const dashboard = handleActions({
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const {
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
} = payload;
const newState = {
...state,
isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
| </s> remove announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
</s> add version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort, </s> remove isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
</s> add ...payload,
processingSetUpstream: false,
}), </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
}, {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
});
</s> add const setting = settingsList[settingKey]; | const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({ | processingDhcpStatus: false,
settingsList: {},
});
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({
...state,
isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
http_port: httpPort,
} = payload;
const newState = {
...state,
isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
| </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove const dashboard = handleActions({
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const {
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
} = payload;
const newState = {
</s> add const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({ </s> remove [actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }), </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
</s> add return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, | ...payload,
processingSetUpstream: false,
}), | http_port: httpPort,
} = payload;
const newState = {
...state,
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
...payload,
processingSetUpstream: false,
}),
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false }; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
| </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
</s> add ...payload,
processingSetUpstream: false,
}), </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove [actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
</s> add const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => { | [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }), | };
return newState;
},
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
| </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove [actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }), </s> remove [actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
</s> add const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => { </s> remove isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
</s> add ...payload,
processingSetUpstream: false,
}), </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, | [actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
{
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
{
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
{
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
{
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
{
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
{
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
},
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
| </s> remove [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
}, {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
});
</s> add const setting = settingsList[settingKey]; </s> remove const dashboard = handleActions({
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const {
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
} = payload;
const newState = {
</s> add const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({ </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove [actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
</s> add const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => { </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; | ); | processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
},
);
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }), | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
| </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
</s> add version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort, </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; | const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => { | const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
| </s> remove [actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
</s> add const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => { </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove const dhcp = handleActions({
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const {
static_leases: staticLeases,
...values
} = payload;
</s> add const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload; </s> remove [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const {
ip, mac, hostname,
} = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
</s> add [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
}, | version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort, | const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
} = payload;
const newState = {
...state,
announcementUrl, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
| </s> remove announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
</s> add version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort, </s> remove [actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
</s> add const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => { </s> remove }
</s> add }, </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, </s> remove const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
</s> add const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
}, | isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, | } = payload;
const newState = {
...state,
isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state,
isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state,
isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state,
isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state,
processingVersion: false,
};
return newState;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
processingVersion: false,
};
return newState;
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
| </s> remove return {
...state,
processingVersion: false,
};
},
</s> add [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
}, </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, </s> remove [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
</s> add [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove [actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }), | },
[actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false }; | processingVersion: false,
};
},
[actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state,
processingVersion: false,
};
| </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
</s> add return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove return {
...state,
processingVersion: false,
};
},
</s> add [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
}, </s> remove }, {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
});
</s> add {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
); | }, | isUpdateAvailable: true,
processingVersion: false,
};
return newState;
},
return {
...state,
processingVersion: false,
}; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
};
return newState;
}
return {
...state,
processingVersion: false,
};
},
[actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
| </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, </s> remove [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
</s> add [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, | [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
}, | };
return newState;
}
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
[actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false }; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
processingVersion: false,
};
},
[actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
| </s> remove return {
...state,
processingVersion: false,
};
},
</s> add [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
}, </s> remove [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
</s> add [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, | [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | processingVersion: false,
};
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const newState = { ...state, processingUpdate: false };
return newState;
},
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
| </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, </s> remove return {
...state,
processingVersion: false,
};
},
</s> add [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
}, </s> remove [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
</s> add [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
}, </s> remove [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
</s> add [actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload; | [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, | const newState = { ...state, processingUpdate: false };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
};
return newState;
},
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
| </s> remove [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
</s> add [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, </s> remove [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
</s> add [actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload; </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, </s> remove [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
</s> add [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; | [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
}, | };
return newState;
},
[actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
},
[actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
},
[actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
},
[actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
[actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
| </s> remove [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
</s> add [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
}, </s> remove [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
</s> add [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, </s> remove [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
</s> add return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; | [actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload; | const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload;
[actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload;
[actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload;
[actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload;
[actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const newState = { ...state, language: payload };
return newState;
},
[actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
},
}, {
processing: true,
isCoreRunning: false,
processingVersion: true,
| </s> remove [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
</s> add [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
}, </s> remove [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
</s> add [actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload; </s> remove }, {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
});
</s> add {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
); </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, | return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, | const newState = { ...state, language: payload };
return newState;
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
},
},
}, {
processing: true,
isCoreRunning: false,
processingVersion: true, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
processingClients: false,
};
return newState;
},
}, {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
});
const dhcp = handleActions({
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
| </s> remove [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
</s> add return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, </s> remove const dhcp = handleActions({
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const {
static_leases: staticLeases,
...values
} = payload;
</s> add const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload; </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, </s> remove [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
</s> add [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
[actions.getClientsSuccess]: (state, { payload }) => {
const newState = {
...state,
clients: payload.clients,
autoClients: payload.autoClients,
processingClients: false,
};
return newState;
}, | {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
); | processingClients: false,
};
return newState;
},
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
{
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
);
const dhcp = handleActions({
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
clients: [],
autoClients: [],
});
const dhcp = handleActions({
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const {
static_leases: staticLeases,
...values
} = payload;
const newState = {
...state,
staticLeases,
processing: false,
| </s> remove }, {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
});
</s> add {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
); </s> remove const newState = {
...state,
staticLeases,
processing: false,
...values,
};
</s> add const newState = {
...state,
staticLeases,
processing: false,
...values,
}; </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove const dashboard = handleActions({
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => {
const {
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort,
} = payload;
const newState = {
</s> add const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingSetUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingSetUpstream: false }),
[actions.setUpstreamSuccess]: (state, { payload }) => ({ </s> remove [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
}, {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {},
});
</s> add const setting = settingsList[settingKey]; | const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload; | clients: [],
autoClients: [],
});
const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload;
const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload;
const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload;
const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload;
const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload;
const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload;
const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload;
const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload;
const newState = {
...state,
staticLeases,
processing: false, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
static_leases: staticLeases,
...values
} = payload;
const newState = {
...state,
staticLeases,
processing: false,
...values,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
| </s> remove const dhcp = handleActions({
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const {
static_leases: staticLeases,
...values
} = payload;
</s> add const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload; </s> remove return newState;
},
</s> add return newState;
}, </s> remove [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
</s> add [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
</s> add isCoreRunning: running,
processing: false,
dnsVersion: version,
dnsPort,
dnsAddresses,
upstreamDns: upstreamDns.join('\n'),
bootstrapDns: bootstrapDns.join('\n'),
allServers,
protectionEnabled,
language,
httpPort,
};
return newState;
},
[actions.enableDnsRequest]: state => ({ ...state, processing: true }),
[actions.enableDnsFailure]: state => ({ ...state, processing: false }),
[actions.enableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
},
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
can_autoupdate: canAutoUpdate,
} = payload;
const newState = {
...state,
announcementUrl,
newVersion,
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
};
return newState;
}
return {
...state, | const newState = {
...state,
staticLeases,
processing: false,
...values,
}; | static_leases: staticLeases,
...values
} = payload;
const newState = {
...state,
staticLeases,
processing: false,
...values,
};
const newState = {
...state,
staticLeases,
processing: false,
...values,
};
const newState = {
...state,
staticLeases,
processing: false,
...values,
};
const newState = {
...state,
staticLeases,
processing: false,
...values,
};
const newState = {
...state,
staticLeases,
processing: false,
...values,
};
const newState = {
...state,
staticLeases,
processing: false,
...values,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
processing: false,
...values,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
| </s> remove [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
</s> add [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
}, </s> remove const newState = {
...state,
staticLeases,
processing: false,
...values,
};
</s> add const newState = {
...state,
staticLeases,
processing: false,
...values,
}; </s> remove [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
</s> add [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, | return newState;
}, | processing: false,
...values,
};
return newState;
},
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const {
| </s> remove return newState;
},
</s> add return newState;
}, </s> remove [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const {
other_server: otherServer,
static_ip: staticIP,
} = payload;
</s> add [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload; </s> remove [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
</s> add [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
}, </s> remove [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
</s> add [actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload; </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
}, |
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
};
return newState;
},
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const {
other_server: otherServer,
static_ip: staticIP,
} = payload;
const newState = {
...state,
check: {
otherServer,
| </s> remove const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
</s> add const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
}, </s> remove [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
</s> add [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
}, </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
</s> add [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
}, | [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload; | };
return newState;
},
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload;
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload;
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload;
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload;
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload;
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload;
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload;
const newState = {
...state,
check: {
otherServer, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
other_server: otherServer,
static_ip: staticIP,
} = payload;
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
| </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, </s> remove [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const {
other_server: otherServer,
static_ip: staticIP,
} = payload;
</s> add [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload; </s> remove [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
</s> add [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
}, | other_server: otherServer,
static_ip: staticIP,
} = payload;
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
| </s> remove [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
</s> add [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
}, </s> remove const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
</s> add const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
}, </s> remove [actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
</s> add [actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, | };
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
};
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
| </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, </s> remove [actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
</s> add [actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
}, </s> remove const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
</s> add const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
}, | };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const {
| </s> remove [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const {
ip, mac, hostname,
} = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
</s> add [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
}, </s> remove [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
</s> add [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
}, </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, </s> remove [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
[actions.toggleProtectionSuccess]: (state) => {
const newState = {
...state,
protectionEnabled: !state.protectionEnabled,
processingProtection: false,
};
return newState;
},
</s> add [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, | [actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
}, | const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const {
ip, mac, hostname,
} = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
| </s> remove [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
</s> add [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
}, </s> remove [actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
</s> add [actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
}, </s> remove const settings = handleActions({
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload;
const setting = settingsList[settingKey];
const newSetting = { ...setting, enabled: !setting.enabled };
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
return { ...state, settingsList: newSettingsList };
},
[actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
[actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
[actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
</s> add const settings = handleActions(
{
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
[actions.initSettingsSuccess]: (state, { payload }) => {
const { settingsList } = payload;
const newState = { ...state, settingsList, processing: false };
return newState;
},
[actions.toggleSettingStatus]: (state, { payload }) => {
const { settingsList } = state;
const { settingKey } = payload; </s> remove [actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
</s> add [actions.getDnsSettingsRequest]: state => ({ ...state, processingDnsSettings: true }),
[actions.getDnsSettingsFailure]: state => ({ ...state, processingDnsSettings: false }),
[actions.getDnsSettingsSuccess]: (state, { payload }) => {
const {
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
} = payload; </s> remove [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false };
return newState;
},
</s> add [actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
}, | };
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
}, {
processing: true,
processingStatus: false,
processingInterfaces: false,
| </s> remove [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const {
ip, mac, hostname,
} = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
},
</s> add [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
const { ip, mac, hostname } = payload;
const newLease = {
ip,
mac,
hostname: hostname || '',
};
const leases = [...state.staticLeases, newLease];
const newState = {
...state,
staticLeases: leases,
processingAdding: false,
};
return newState;
}, </s> remove [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
},
</s> add [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
const newState = {
...state,
interfaces: payload,
processingInterfaces: false,
};
return newState;
}, </s> remove return newState;
},
</s> add return newState;
}, </s> remove [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const {
other_server: otherServer,
static_ip: staticIP,
} = payload;
</s> add [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload; </s> remove
[actions.disableDnsRequest]: state => ({ ...state, processing: true }),
[actions.disableDnsFailure]: state => ({ ...state, processing: false }),
[actions.disableDnsSuccess]: (state) => {
const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
return newState;
</s> add {
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, | [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
}, | };
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
},
},
}, {
processing: true,
processingStatus: false,
processingInterfaces: false, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
processingDeleting: false,
};
return newState;
},
}, {
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
| </s> remove check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
});
</s> add ); </s> remove [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
</s> add [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
}, </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, </s> remove }, {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
});
</s> add {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
); </s> remove const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
},
</s> add const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
}, | {
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false, | processingDeleting: false,
};
return newState;
},
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
});
export default combineReducers({
settings,
dashboard,
queryLogs,
| </s> remove }, {
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
</s> add {
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false, </s> remove }, {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
});
</s> add {
processing: true,
isCoreRunning: false,
processingVersion: true,
processingFiltering: true,
processingClients: true,
processingUpdate: false,
processingDnsSettings: true,
upstreamDns: '',
bootstrapDns: '',
allServers: false,
protectionEnabled: false,
processingProtection: false,
httpPort: 80,
dnsPort: 53,
dnsAddresses: [],
dnsVersion: '',
clients: [],
autoClients: [],
},
); </s> remove [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state, config: newConfig, check: null, processingDhcp: false,
};
return newState;
},
</s> add [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
[actions.toggleDhcpSuccess]: (state) => {
const { config } = state;
const newConfig = { ...config, enabled: !config.enabled };
const newState = {
...state,
config: newConfig,
check: null,
processingDhcp: false,
};
return newState;
}, </s> remove [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
</s> add [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
const leaseToRemove = payload.ip;
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
const newState = {
...state,
staticLeases: leases,
processingDeleting: false,
};
return newState;
}, </s> remove const dhcp = handleActions({
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const {
static_leases: staticLeases,
...values
} = payload;
</s> add const dhcp = handleActions(
{
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
const { static_leases: staticLeases, ...values } = payload; | ); | processingDeleting: false,
config: {
enabled: false,
},
);
);
);
);
);
export default combineReducers({
settings,
dashboard,
queryLogs, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | - client: fix upstream DNS servers form
Closes #1000 | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
package dnsforward
import (
"crypto/tls"
"errors"
"fmt"
"net"
"net/http"
"runtime"
"strings"
| </s> remove "fmt"
</s> add </s> remove "github.com/AdguardTeam/dnsproxy/upstream"
</s> add "github.com/AdguardTeam/AdGuardHome/dnsforward" </s> remove "github.com/AdguardTeam/dnsproxy/upstream"
</s> add </s> remove github.com/AdguardTeam/dnsproxy v0.22.0
</s> add github.com/AdguardTeam/dnsproxy v0.23.0 </s> remove const (
rdnsTimeout = 3 * time.Second // max time to wait for rDNS response
)
</s> add | package dnsforward
import (
"crypto/tls"
"fmt"
"net"
"net/http"
"runtime"
"strings" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
|
stats stats.Stats
access *accessCtx
webRegistered bool
isRunning bool
sync.RWMutex
conf ServerConfig
| </s> remove clients clientsContainer // per-client-settings module
</s> add </s> remove isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
</s> add defer s.RUnlock()
return s.isRunning </s> remove return config.dnsServer != nil && config.dnsServer.IsRunning()
</s> add return Context.dnsServer != nil && Context.dnsServer.IsRunning() | // DNS proxy instance for internal usage
// We don't Start() it and so no listen port is required.
internalProxy *proxy.Proxy
| stats stats.Stats
access *accessCtx
// DNS proxy instance for internal usage
// We don't Start() it and so no listen port is required.
internalProxy *proxy.Proxy
webRegistered bool
isRunning bool
sync.RWMutex
conf ServerConfig | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
internalProxy *proxy.Proxy
webRegistered bool
sync.RWMutex
conf ServerConfig
}
| </s> remove s.limit = conf.LimitDays * 24
s.conf = conf
</s> add s.conf = &Config{}
*s.conf = conf
s.conf.limit = conf.LimitDays * 24 </s> remove return config.dnsServer != nil && config.dnsServer.IsRunning()
</s> add return Context.dnsServer != nil && Context.dnsServer.IsRunning() </s> remove limit uint32 // maximum time we need to keep data for (in hours)
db *bolt.DB
conf Config
</s> add db *bolt.DB
conf *Config | isRunning bool | internalProxy *proxy.Proxy
webRegistered bool
isRunning bool
sync.RWMutex
conf ServerConfig
}
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
s.Lock()
s.dnsFilter = nil
s.stats = nil
s.queryLog = nil
s.Unlock()
}
// WriteDiskConfig - write configuration
func (s *Server) WriteDiskConfig(c *FilteringConfig) {
s.Lock()
| </s> remove err := s.prepare(nil)
</s> add err := s.Prepare(nil) </s> remove isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
</s> add defer s.RUnlock()
return s.isRunning </s> remove func (s *Server) Start(config *ServerConfig) error {
</s> add func (s *Server) Start() error { </s> remove return s.startInternal(config)
</s> add return s.startInternal() </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { | s.dnsProxy = nil | s.Lock()
s.dnsFilter = nil
s.stats = nil
s.queryLog = nil
s.dnsProxy = nil
s.Unlock()
}
// WriteDiskConfig - write configuration
func (s *Server) WriteDiskConfig(c *FilteringConfig) {
s.Lock() | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
FilteringConfig: FilteringConfig{BlockedResponseTTL: 3600},
}
// Start starts the DNS server
func (s *Server) Start(config *ServerConfig) error {
s.Lock()
defer s.Unlock()
return s.startInternal(config)
}
| </s> remove return s.startInternal(config)
</s> add return s.startInternal() </s> remove func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
</s> add func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true </s> remove isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
</s> add defer s.RUnlock()
return s.isRunning </s> remove err := s.prepare(nil)
</s> add err := s.Prepare(nil) </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { | func (s *Server) Start() error { | FilteringConfig: FilteringConfig{BlockedResponseTTL: 3600},
}
// Start starts the DNS server
func (s *Server) Start() error {
s.Lock()
defer s.Unlock()
return s.startInternal(config)
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
// Start starts the DNS server
func (s *Server) Start(config *ServerConfig) error {
s.Lock()
defer s.Unlock()
return s.startInternal(config)
}
// startInternal starts without locking
func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
| </s> remove func (s *Server) Start(config *ServerConfig) error {
</s> add func (s *Server) Start() error { </s> remove func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
</s> add func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { </s> remove return s.dnsProxy.Start()
</s> add return err </s> remove err := s.prepare(nil)
</s> add err := s.Prepare(nil) | return s.startInternal() | // Start starts the DNS server
func (s *Server) Start(config *ServerConfig) error {
s.Lock()
defer s.Unlock()
return s.startInternal()
}
// startInternal starts without locking
func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
return s.startInternal(config)
}
// startInternal starts without locking
func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
}
return s.dnsProxy.Start()
}
// Prepare the object
| </s> remove return s.startInternal(config)
</s> add return s.startInternal() </s> remove return s.dnsProxy.Start()
</s> add return err </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { </s> remove func (s *Server) Start(config *ServerConfig) error {
</s> add func (s *Server) Start() error { </s> remove s.dnsProxy = nil
</s> add | func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true | return s.startInternal(config)
}
// startInternal starts without locking
func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true
func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true
func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true
func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true
}
return s.dnsProxy.Start()
}
// Prepare the object | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
err := s.prepare(config)
if err != nil {
return err
}
return s.dnsProxy.Start()
}
// Prepare the object
func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
| </s> remove func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
</s> add func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { </s> remove s.dnsProxy = nil
</s> add </s> remove return s.startInternal(config)
</s> add return s.startInternal() </s> remove err := s.prepare(nil)
</s> add err := s.Prepare(nil) | return err | err := s.prepare(config)
if err != nil {
return err
}
return err
}
// Prepare the object
func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
return s.dnsProxy.Start()
}
// Prepare the object
func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
if config != nil {
s.conf = *config
}
if len(s.conf.UpstreamDNS) == 0 {
| </s> remove return s.dnsProxy.Start()
</s> add return err </s> remove func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
</s> add func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true </s> remove s.dnsProxy = nil
</s> add </s> remove isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
</s> add defer s.RUnlock()
return s.isRunning | func (s *Server) Prepare(config *ServerConfig) error { | return s.dnsProxy.Start()
}
// Prepare the object
func (s *Server) Prepare(config *ServerConfig) error {
func (s *Server) Prepare(config *ServerConfig) error {
func (s *Server) Prepare(config *ServerConfig) error {
func (s *Server) Prepare(config *ServerConfig) error {
func (s *Server) Prepare(config *ServerConfig) error {
if config != nil {
s.conf = *config
}
if len(s.conf.UpstreamDNS) == 0 { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
}
s.access = &accessCtx{}
err = s.access.Init(s.conf.AllowedClients, s.conf.DisallowedClients, s.conf.BlockedHosts)
if err != nil {
return err
| </s> remove err = config.dhcpServer.Start()
</s> add err = Context.dhcpServer.Start() </s> remove err = s.startInternal(config)
</s> add err = s.Prepare(config)
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
err = s.startInternal() </s> remove initDNSServer()
</s> add err = initDNSServer()
if err != nil {
log.Fatalf("%s", err)
} </s> remove err = s.startInternal(nil)
</s> add err = s.startInternal() </s> remove initDNSServer()
err = startDNSServer()
if err != nil {
</s> add err = initDNSServer()
var err2 error
if err == nil {
err2 = startDNSServer()
}
if err != nil || err2 != nil { | intlProxyConfig := proxy.Config{
CacheEnabled: true,
CacheSizeBytes: 4096,
Upstreams: s.conf.Upstreams,
DomainsReservedUpstreams: s.conf.DomainsReservedUpstreams,
}
s.internalProxy = &proxy.Proxy{Config: intlProxyConfig}
| }
intlProxyConfig := proxy.Config{
CacheEnabled: true,
CacheSizeBytes: 4096,
Upstreams: s.conf.Upstreams,
DomainsReservedUpstreams: s.conf.DomainsReservedUpstreams,
}
s.internalProxy = &proxy.Proxy{Config: intlProxyConfig}
s.access = &accessCtx{}
err = s.access.Init(s.conf.AllowedClients, s.conf.DisallowedClients, s.conf.BlockedHosts)
if err != nil {
return err | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
// stopInternal stops without locking
func (s *Server) stopInternal() error {
if s.dnsProxy != nil {
err := s.dnsProxy.Stop()
s.dnsProxy = nil
if err != nil {
return errorx.Decorate(err, "could not stop the DNS server properly")
}
}
| </s> remove func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
</s> add func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true </s> remove return s.dnsProxy.Start()
</s> add return err </s> remove err = s.startInternal(nil)
</s> add err = s.startInternal() </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { </s> remove err = s.startInternal(config)
</s> add err = s.Prepare(config)
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
err = s.startInternal() | // stopInternal stops without locking
func (s *Server) stopInternal() error {
if s.dnsProxy != nil {
err := s.dnsProxy.Stop()
if err != nil {
return errorx.Decorate(err, "could not stop the DNS server properly")
}
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
|
}
}
return nil
}
// IsRunning returns true if the DNS server is running
func (s *Server) IsRunning() bool {
| </s> remove isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
</s> add defer s.RUnlock()
return s.isRunning </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { </s> remove func (s *Server) Start(config *ServerConfig) error {
</s> add func (s *Server) Start() error { </s> remove s.dnsProxy = nil
</s> add </s> remove func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
</s> add func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true | s.isRunning = false | }
}
s.isRunning = false
return nil
}
// IsRunning returns true if the DNS server is running
func (s *Server) IsRunning() bool { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
// IsRunning returns true if the DNS server is running
func (s *Server) IsRunning() bool {
s.RLock()
isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
}
// Restart - restart server
func (s *Server) Restart() error {
s.Lock()
| </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { </s> remove s.dnsProxy = nil
</s> add </s> remove func (s *Server) Start(config *ServerConfig) error {
</s> add func (s *Server) Start() error { </s> remove func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
</s> add func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true | defer s.RUnlock()
return s.isRunning |
// IsRunning returns true if the DNS server is running
func (s *Server) IsRunning() bool {
s.RLock()
defer s.RUnlock()
return s.isRunning
defer s.RUnlock()
return s.isRunning
defer s.RUnlock()
return s.isRunning
defer s.RUnlock()
return s.isRunning
defer s.RUnlock()
return s.isRunning
defer s.RUnlock()
return s.isRunning
}
// Restart - restart server
func (s *Server) Restart() error {
s.Lock() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
err := s.stopInternal()
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
err = s.startInternal(nil)
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
return nil
| </s> remove err = s.startInternal(config)
</s> add err = s.Prepare(config)
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
err = s.startInternal() </s> remove s.dnsProxy = nil
</s> add </s> remove err := config.dhcpServer.Init(config.DHCP)
</s> add err := Context.dhcpServer.Init(config.DHCP) </s> remove err = config.dhcpServer.Start()
</s> add err = Context.dhcpServer.Start() </s> remove newconfig, err := generateServerConfig()
if err != nil {
return errorx.Decorate(err, "Couldn't start forwarding DNS server")
}
err = config.dnsServer.Reconfigure(&newconfig)
</s> add newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig) | err = s.startInternal() | err := s.stopInternal()
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
err = s.startInternal()
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
return nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
if runtime.GOOS == "windows" {
time.Sleep(1 * time.Second)
}
err = s.startInternal(config)
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
return nil
| </s> remove err = s.startInternal(nil)
</s> add err = s.startInternal() </s> remove s.dnsProxy = nil
</s> add </s> remove err = config.dhcpServer.Start()
</s> add err = Context.dhcpServer.Start() </s> remove err := config.dhcpServer.Init(config.DHCP)
</s> add err := Context.dhcpServer.Init(config.DHCP) </s> remove newconfig, err := generateServerConfig()
if err != nil {
return errorx.Decorate(err, "Couldn't start forwarding DNS server")
}
err = config.dnsServer.Reconfigure(&newconfig)
</s> add newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig) | err = s.Prepare(config)
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
err = s.startInternal() | if runtime.GOOS == "windows" {
time.Sleep(1 * time.Second)
}
err = s.Prepare(config)
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
err = s.startInternal()
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
return nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
)
func TestServer(t *testing.T) {
s := createTestServer(t)
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// message over UDP
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() | )
func TestServer(t *testing.T) {
s := createTestServer(t)
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// message over UDP | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
func TestServerWithProtectionDisabled(t *testing.T) {
s := createTestServer(t)
s.conf.ProtectionEnabled = false
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// message over UDP
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() |
func TestServerWithProtectionDisabled(t *testing.T) {
s := createTestServer(t)
s.conf.ProtectionEnabled = false
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// message over UDP | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
}
// Starting the server
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | _ = s.Prepare(nil) | }
_ = s.Prepare(nil)
// Starting the server
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err) | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
PrivateKeyData: keyPem,
}
// Starting the server
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// Add our self-signed generated config to roots
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() | PrivateKeyData: keyPem,
}
// Starting the server
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// Add our self-signed generated config to roots | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
}
func TestServerRace(t *testing.T) {
s := createTestServer(t)
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// message over UDP
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() | }
func TestServerRace(t *testing.T) {
s := createTestServer(t)
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// message over UDP | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
}
func TestSafeSearch(t *testing.T) {
s := createTestServer(t)
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// Test safe search for yandex. We already know safe search ip
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() | }
func TestSafeSearch(t *testing.T) {
s := createTestServer(t)
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// Test safe search for yandex. We already know safe search ip | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
}
func TestInvalidRequest(t *testing.T) {
s := createTestServer(t)
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// server is running, send a message
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() | }
func TestInvalidRequest(t *testing.T) {
s := createTestServer(t)
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
// server is running, send a message | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
}
func TestBlockedRequest(t *testing.T) {
s := createTestServer(t)
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() | }
func TestBlockedRequest(t *testing.T) {
s := createTestServer(t)
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
func (s *Server) startWithUpstream(u upstream.Upstream) error {
s.Lock()
defer s.Unlock()
err := s.prepare(nil)
if err != nil {
return err
}
s.dnsProxy.Upstreams = []upstream.Upstream{u}
return s.dnsProxy.Start()
| </s> remove func (s *Server) startInternal(config *ServerConfig) error {
err := s.prepare(config)
if err != nil {
return err
</s> add func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true </s> remove return s.startInternal(config)
</s> add return s.startInternal() </s> remove func (s *Server) Start(config *ServerConfig) error {
</s> add func (s *Server) Start() error { </s> remove return s.dnsProxy.Start()
</s> add return err </s> remove isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
</s> add defer s.RUnlock()
return s.isRunning | err := s.Prepare(nil) |
func (s *Server) startWithUpstream(u upstream.Upstream) error {
s.Lock()
defer s.Unlock()
err := s.Prepare(nil)
if err != nil {
return err
}
s.dnsProxy.Upstreams = []upstream.Upstream{u}
return s.dnsProxy.Start() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
func TestNullBlockedRequest(t *testing.T) {
s := createTestServer(t)
s.conf.FilteringConfig.BlockingMode = "null_ip"
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() |
func TestNullBlockedRequest(t *testing.T) {
s := createTestServer(t)
s.conf.FilteringConfig.BlockingMode = "null_ip"
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
}
func TestBlockedByHosts(t *testing.T) {
s := createTestServer(t)
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() | }
func TestBlockedByHosts(t *testing.T) {
s := createTestServer(t)
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
}
func TestBlockedBySafeBrowsing(t *testing.T) {
s := createTestServer(t)
err := s.Start(nil)
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Start() | }
func TestBlockedBySafeBrowsing(t *testing.T) {
s := createTestServer(t)
err := s.Start()
if err != nil {
t.Fatalf("Failed to start server: %s", err)
}
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
s.conf.UpstreamDNS = []string{"8.8.8.8:53", "8.8.4.4:53"}
s.conf.FilteringConfig.ProtectionEnabled = true
return s
}
func createServerTLSConfig(t *testing.T) (*tls.Config, []byte, []byte) {
privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
| </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() </s> remove err := s.Start(nil)
</s> add err := s.Start() | err := s.Prepare(nil)
assert.True(t, err == nil) | s.conf.UpstreamDNS = []string{"8.8.8.8:53", "8.8.4.4:53"}
s.conf.FilteringConfig.ProtectionEnabled = true
err := s.Prepare(nil)
assert.True(t, err == nil)
return s
}
func createServerTLSConfig(t *testing.T) (*tls.Config, []byte, []byte) {
privateKey, err := rsa.GenerateKey(rand.Reader, 2048) | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
go 1.13
require (
github.com/AdguardTeam/dnsproxy v0.22.0
github.com/AdguardTeam/golibs v0.3.0
github.com/AdguardTeam/urlfilter v0.7.0
github.com/NYTimes/gziphandler v1.1.1
github.com/etcd-io/bbolt v1.3.3
github.com/go-test/deep v1.0.4 // indirect
| </s> remove github.com/AdguardTeam/dnsproxy v0.22.0 h1:8mpPu+KN0puFTHNhGy7XQ13fe3+3DGFaiwnqhNMWl+M=
github.com/AdguardTeam/dnsproxy v0.22.0/go.mod h1:2qy8rpdfBzKgMPxkHmPdaNK4XZJ322v4KtVGI8s8Bn0=
</s> add github.com/AdguardTeam/dnsproxy v0.23.0 h1:GrOUapcWjf19MF8NznZUbcYujBbl7QXapBWTFKqkJQg=
github.com/AdguardTeam/dnsproxy v0.23.0/go.mod h1:2qy8rpdfBzKgMPxkHmPdaNK4XZJ322v4KtVGI8s8Bn0= </s> remove "fmt"
</s> add </s> remove "errors"
</s> add </s> remove config.httpsServer.cond = sync.NewCond(&config.httpsServer.Mutex)
</s> add Context.httpsServer.cond = sync.NewCond(&Context.httpsServer.Mutex) </s> remove const (
rdnsTimeout = 3 * time.Second // max time to wait for rDNS response
)
</s> add | github.com/AdguardTeam/dnsproxy v0.23.0 |
go 1.13
require (
github.com/AdguardTeam/dnsproxy v0.23.0
github.com/AdguardTeam/golibs v0.3.0
github.com/AdguardTeam/urlfilter v0.7.0
github.com/NYTimes/gziphandler v1.1.1
github.com/etcd-io/bbolt v1.3.3
github.com/go-test/deep v1.0.4 // indirect | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | go.mod |
github.com/AdguardTeam/dnsproxy v0.22.0 h1:8mpPu+KN0puFTHNhGy7XQ13fe3+3DGFaiwnqhNMWl+M=
github.com/AdguardTeam/dnsproxy v0.22.0/go.mod h1:2qy8rpdfBzKgMPxkHmPdaNK4XZJ322v4KtVGI8s8Bn0=
github.com/AdguardTeam/golibs v0.2.4 h1:GUssokegKxKF13K67Pgl0ZGwqHjNN6X7sep5ik6ORdY=
github.com/AdguardTeam/golibs v0.2.4/go.mod h1:R3M+mAg3nWG4X4Hsag5eef/TckHFH12ZYhK7AzJc8+U=
github.com/AdguardTeam/golibs v0.3.0 h1:1zO8ulGEOdXDDM++Ap4sYfTsT/Z4tZBZtiWSA4ykcOU=
github.com/AdguardTeam/golibs v0.3.0/go.mod h1:R3M+mAg3nWG4X4Hsag5eef/TckHFH12ZYhK7AzJc8+U=
github.com/AdguardTeam/gomitmproxy v0.1.2/go.mod h1:Mrt/3EfiXIYY2aZ7KsLuCUJzUARD/fWJ119IfzOB13M=
| </s> remove github.com/AdguardTeam/dnsproxy v0.22.0
</s> add github.com/AdguardTeam/dnsproxy v0.23.0 </s> remove a := convertMapToArray(m, int(limit))
</s> add a := convertMapToArray(m, int(maxCount)) </s> remove config.queryLog.WriteDiskConfig(&dc)
</s> add Context.queryLog.WriteDiskConfig(&dc) </s> remove config.dhcpServer.WriteDiskConfig(&c)
</s> add Context.dhcpServer.WriteDiskConfig(&c) </s> remove if config.dhcpServer != nil {
</s> add if Context.dhcpServer != nil { | github.com/AdguardTeam/dnsproxy v0.23.0 h1:GrOUapcWjf19MF8NznZUbcYujBbl7QXapBWTFKqkJQg=
github.com/AdguardTeam/dnsproxy v0.23.0/go.mod h1:2qy8rpdfBzKgMPxkHmPdaNK4XZJ322v4KtVGI8s8Bn0= | github.com/AdguardTeam/dnsproxy v0.23.0 h1:GrOUapcWjf19MF8NznZUbcYujBbl7QXapBWTFKqkJQg=
github.com/AdguardTeam/dnsproxy v0.23.0/go.mod h1:2qy8rpdfBzKgMPxkHmPdaNK4XZJ322v4KtVGI8s8Bn0=
github.com/AdguardTeam/dnsproxy v0.23.0 h1:GrOUapcWjf19MF8NznZUbcYujBbl7QXapBWTFKqkJQg=
github.com/AdguardTeam/dnsproxy v0.23.0/go.mod h1:2qy8rpdfBzKgMPxkHmPdaNK4XZJ322v4KtVGI8s8Bn0=
github.com/AdguardTeam/golibs v0.2.4 h1:GUssokegKxKF13K67Pgl0ZGwqHjNN6X7sep5ik6ORdY=
github.com/AdguardTeam/golibs v0.2.4/go.mod h1:R3M+mAg3nWG4X4Hsag5eef/TckHFH12ZYhK7AzJc8+U=
github.com/AdguardTeam/golibs v0.3.0 h1:1zO8ulGEOdXDDM++Ap4sYfTsT/Z4tZBZtiWSA4ykcOU=
github.com/AdguardTeam/golibs v0.3.0/go.mod h1:R3M+mAg3nWG4X4Hsag5eef/TckHFH12ZYhK7AzJc8+U=
github.com/AdguardTeam/gomitmproxy v0.1.2/go.mod h1:Mrt/3EfiXIYY2aZ7KsLuCUJzUARD/fWJ119IfzOB13M= | [
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | go.sum |
}
// WriteDiskConfig - write configuration
func (clients *clientsContainer) WriteDiskConfig(objects *[]clientObject) {
clientsList := clients.GetList()
for _, cli := range clientsList {
cy := clientObject{
Name: cli.Name,
IDs: cli.IDs,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
| </s> remove Name: cli.Name,
IDs: cli.IDs,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
</s> add Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled, </s> remove a := convertMapToArray(m, int(limit))
</s> add a := convertMapToArray(m, int(maxCount)) </s> remove config.dnsctx.rdns.Begin(ip)
</s> add Context.rdns.Begin(ip) </s> remove topClients := config.stats.GetTopClientsIP(topClientsNumber)
</s> add topClients := Context.stats.GetTopClientsIP(topClientsNumber) | clients.lock.Lock()
for _, cli := range clients.list { | }
// WriteDiskConfig - write configuration
func (clients *clientsContainer) WriteDiskConfig(objects *[]clientObject) {
clients.lock.Lock()
for _, cli := range clients.list {
clients.lock.Lock()
for _, cli := range clients.list {
cy := clientObject{
Name: cli.Name,
IDs: cli.IDs,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
func (clients *clientsContainer) WriteDiskConfig(objects *[]clientObject) {
clientsList := clients.GetList()
for _, cli := range clientsList {
cy := clientObject{
Name: cli.Name,
IDs: cli.IDs,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
BlockedServices: cli.BlockedServices,
Upstreams: cli.Upstreams,
}
| </s> remove clientsList := clients.GetList()
for _, cli := range clientsList {
</s> add clients.lock.Lock()
for _, cli := range clients.list { </s> remove BlockedServices: cli.BlockedServices,
Upstreams: cli.Upstreams,
</s> add </s> remove a := convertMapToArray(m, int(limit))
</s> add a := convertMapToArray(m, int(maxCount)) </s> remove config.dnsctx.rdns.Begin(ip)
</s> add Context.rdns.Begin(ip) | Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled, | func (clients *clientsContainer) WriteDiskConfig(objects *[]clientObject) {
clientsList := clients.GetList()
for _, cli := range clientsList {
cy := clientObject{
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
BlockedServices: cli.BlockedServices,
Upstreams: cli.Upstreams,
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
BlockedServices: cli.BlockedServices,
Upstreams: cli.Upstreams,
}
*objects = append(*objects, cy)
}
}
| </s> remove Name: cli.Name,
IDs: cli.IDs,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
</s> add Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled, </s> remove _ = config.dnsFilter.SetFilters(filters, async)
</s> add _ = Context.dnsFilter.SetFilters(filters, async) | SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
}
*objects = append(*objects, cy)
}
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
|
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
}
*objects = append(*objects, cy)
}
clients.lock.Unlock()
}
| </s> remove BlockedServices: cli.BlockedServices,
Upstreams: cli.Upstreams,
</s> add </s> remove Name: cli.Name,
IDs: cli.IDs,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
</s> add Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled, </s> remove // GetList returns the pointer to clients list
func (clients *clientsContainer) GetList() map[string]*Client {
return clients.list
}
</s> add </s> remove _ = config.dnsFilter.SetFilters(filters, async)
</s> add _ = Context.dnsFilter.SetFilters(filters, async) | cy.IDs = make([]string, len(cli.IDs))
copy(cy.IDs, cli.IDs)
cy.BlockedServices = make([]string, len(cli.BlockedServices))
copy(cy.BlockedServices, cli.BlockedServices)
cy.Upstreams = make([]string, len(cli.Upstreams))
copy(cy.Upstreams, cli.Upstreams)
| SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
}
cy.IDs = make([]string, len(cli.IDs))
copy(cy.IDs, cli.IDs)
cy.BlockedServices = make([]string, len(cli.BlockedServices))
copy(cy.BlockedServices, cli.BlockedServices)
cy.Upstreams = make([]string, len(cli.Upstreams))
copy(cy.Upstreams, cli.Upstreams)
*objects = append(*objects, cy)
}
clients.lock.Unlock()
}
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
*objects = append(*objects, cy)
}
}
func (clients *clientsContainer) periodicUpdate() {
for {
clients.addFromHostsFile()
clients.addFromSystemARP()
| </s> remove BlockedServices: cli.BlockedServices,
Upstreams: cli.Upstreams,
</s> add </s> remove // GetList returns the pointer to clients list
func (clients *clientsContainer) GetList() map[string]*Client {
return clients.list
}
</s> add </s> remove clientsList := clients.GetList()
for _, cli := range clientsList {
</s> add clients.lock.Lock()
for _, cli := range clients.list { </s> remove func InitRDNS(clients *clientsContainer) *RDNS {
</s> add func InitRDNS(dnsServer *dnsforward.Server, clients *clientsContainer) *RDNS { | clients.lock.Unlock() | *objects = append(*objects, cy)
}
clients.lock.Unlock()
}
func (clients *clientsContainer) periodicUpdate() {
for {
clients.addFromHostsFile()
clients.addFromSystemARP() | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
time.Sleep(clientsUpdatePeriod)
}
}
// GetList returns the pointer to clients list
func (clients *clientsContainer) GetList() map[string]*Client {
return clients.list
}
// Exists checks if client with this IP already exists
func (clients *clientsContainer) Exists(ip string, source clientSource) bool {
clients.lock.Lock()
defer clients.lock.Unlock()
| </s> remove clientsList := clients.GetList()
for _, cli := range clientsList {
</s> add clients.lock.Lock()
for _, cli := range clients.list { </s> remove c, ok := config.clients.Find(clientAddr)
</s> add c, ok := Context.clients.Find(clientAddr) </s> remove isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
</s> add defer s.RUnlock()
return s.isRunning | time.Sleep(clientsUpdatePeriod)
}
}
// Exists checks if client with this IP already exists
func (clients *clientsContainer) Exists(ip string, source clientSource) bool {
clients.lock.Lock()
defer clients.lock.Unlock()
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
|
Verbose bool `yaml:"verbose"` // If true, verbose logging is enabled
}
type HTTPSServer struct {
server *http.Server
cond *sync.Cond // reacts to config.TLS.Enabled, PortHTTPS, CertificateChain and PrivateKey
sync.Mutex // protects config.TLS
shutdown bool // if TRUE, don't restart the server
| </s> remove isRunning := true
if s.dnsProxy == nil {
isRunning = false
}
s.RUnlock()
return isRunning
</s> add defer s.RUnlock()
return s.isRunning </s> remove clients clientsContainer // per-client-settings module
</s> add </s> remove dnsctx dnsContext
dnsFilter *dnsfilter.Dnsfilter
dnsServer *dnsforward.Server
dhcpServer *dhcpd.Server
httpServer *http.Server
httpsServer HTTPSServer
</s> add | // HTTPSServer - HTTPS Server | Verbose bool `yaml:"verbose"` // If true, verbose logging is enabled
}
// HTTPSServer - HTTPS Server
type HTTPSServer struct {
server *http.Server
cond *sync.Cond // reacts to config.TLS.Enabled, PortHTTPS, CertificateChain and PrivateKey
sync.Mutex // protects config.TLS
shutdown bool // if TRUE, don't restart the server | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
// runningAsService flag is set to true when options are passed from the service runner
runningAsService bool
disableUpdate bool // If set, don't check for updates
appSignalChannel chan os.Signal
clients clientsContainer // per-client-settings module
controlLock sync.Mutex
transport *http.Transport
client *http.Client
stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
| </s> remove stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
auth *Auth // HTTP authentication module
</s> add auth *Auth // HTTP authentication module </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread
upstream upstream.Upstream // Upstream object for our own DNS server
</s> add ipChannel chan string // pass data from DNS request handling thread to rDNS thread | // runningAsService flag is set to true when options are passed from the service runner
runningAsService bool
disableUpdate bool // If set, don't check for updates
appSignalChannel chan os.Signal
controlLock sync.Mutex
transport *http.Transport
client *http.Client
stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
|
clients clientsContainer // per-client-settings module
controlLock sync.Mutex
transport *http.Transport
client *http.Client
stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
auth *Auth // HTTP authentication module
// cached version.json to avoid hammering github.io for each page reload
versionCheckJSON []byte
versionCheckLastTime time.Time
| </s> remove clients clientsContainer // per-client-settings module
</s> add </s> remove dnsctx dnsContext
dnsFilter *dnsfilter.Dnsfilter
dnsServer *dnsforward.Server
dhcpServer *dhcpd.Server
httpServer *http.Server
httpsServer HTTPSServer
</s> add </s> remove config.dnsFilter.Close()
config.dnsFilter = nil
</s> add Context.dnsFilter.Close()
Context.dnsFilter = nil </s> remove config.dnsServer.Close()
</s> add Context.dnsServer.Close() | auth *Auth // HTTP authentication module | clients clientsContainer // per-client-settings module
controlLock sync.Mutex
transport *http.Transport
client *http.Client
auth *Auth // HTTP authentication module
auth *Auth // HTTP authentication module
auth *Auth // HTTP authentication module
// cached version.json to avoid hammering github.io for each page reload
versionCheckJSON []byte
versionCheckLastTime time.Time
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
// cached version.json to avoid hammering github.io for each page reload
versionCheckJSON []byte
versionCheckLastTime time.Time
dnsctx dnsContext
dnsFilter *dnsfilter.Dnsfilter
dnsServer *dnsforward.Server
dhcpServer *dhcpd.Server
httpServer *http.Server
httpsServer HTTPSServer
BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
| </s> remove stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
auth *Auth // HTTP authentication module
</s> add auth *Auth // HTTP authentication module </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread
upstream upstream.Upstream // Upstream object for our own DNS server
</s> add ipChannel chan string // pass data from DNS request handling thread to rDNS thread </s> remove err := config.httpServer.ListenAndServe()
</s> add err := Context.httpServer.ListenAndServe() | // cached version.json to avoid hammering github.io for each page reload
versionCheckJSON []byte
versionCheckLastTime time.Time
BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
|
func (c *configuration) write() error {
c.Lock()
defer c.Unlock()
config.clients.WriteDiskConfig(&config.Clients)
if config.auth != nil {
config.Users = config.auth.GetUsers()
}
| </s> remove if config.stats != nil {
</s> add if Context.stats != nil { </s> remove config.dnsctx.rdns = InitRDNS(&config.clients)
config.dnsctx.whois = initWhois(&config.clients)
</s> add Context.rdns = InitRDNS(Context.dnsServer, &Context.clients)
Context.whois = initWhois(&Context.clients) </s> remove err := s.prepare(nil)
</s> add err := s.Prepare(nil) </s> remove config.dnsServer = dnsforward.NewServer(config.dnsFilter, config.stats, config.queryLog)
</s> add Context.dnsServer = dnsforward.NewServer(Context.dnsFilter, Context.stats, Context.queryLog)
dnsConfig := generateServerConfig()
err = Context.dnsServer.Prepare(&dnsConfig)
if err != nil {
return fmt.Errorf("dnsServer.Prepare: %s", err)
} </s> remove func (s *Server) prepare(config *ServerConfig) error {
if s.dnsProxy != nil {
return errors.New("DNS server is already started")
}
</s> add func (s *Server) Prepare(config *ServerConfig) error { | Context.clients.WriteDiskConfig(&config.Clients) | func (c *configuration) write() error {
c.Lock()
defer c.Unlock()
Context.clients.WriteDiskConfig(&config.Clients)
if config.auth != nil {
config.Users = config.auth.GetUsers()
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
if config.auth != nil {
config.Users = config.auth.GetUsers()
}
if config.stats != nil {
sdc := stats.DiskConfig{}
config.stats.WriteDiskConfig(&sdc)
config.DNS.StatsInterval = sdc.Interval
}
| </s> remove config.stats.WriteDiskConfig(&sdc)
</s> add Context.stats.WriteDiskConfig(&sdc) </s> remove if config.queryLog != nil {
</s> add if Context.queryLog != nil { </s> remove config.clients.WriteDiskConfig(&config.Clients)
</s> add Context.clients.WriteDiskConfig(&config.Clients) </s> remove config.dnsServer = dnsforward.NewServer(config.dnsFilter, config.stats, config.queryLog)
</s> add Context.dnsServer = dnsforward.NewServer(Context.dnsFilter, Context.stats, Context.queryLog)
dnsConfig := generateServerConfig()
err = Context.dnsServer.Prepare(&dnsConfig)
if err != nil {
return fmt.Errorf("dnsServer.Prepare: %s", err)
} </s> remove config.queryLog.Close()
config.queryLog = nil
</s> add Context.queryLog.Close()
Context.queryLog = nil | if Context.stats != nil { | if config.auth != nil {
config.Users = config.auth.GetUsers()
}
if Context.stats != nil {
sdc := stats.DiskConfig{}
config.stats.WriteDiskConfig(&sdc)
config.DNS.StatsInterval = sdc.Interval
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Merge: * use upstream servers directly for the internal DNS resolver
Close #1212
* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
. Create a configuration file
. Start AGH instance
. Check Web server
. Check DNS server
. Wait until the filters are downloaded
. Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests
Squashed commit of the following:
commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:53 2019 +0300
minor
commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 18:08:31 2019 +0300
* ci.sh: 'make' and then run tests
commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:50:04 2019 +0300
fix
commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 17:46:33 2019 +0300
tests
commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:56:12 2019 +0300
fix test
commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:48:56 2019 +0300
fix tests
commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:45:00 2019 +0300
linter
commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:33:23 2019 +0300
* config.dnsctx.whois -> Context.whois
commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:31:08 2019 +0300
* don't call log.SetLevel() if not necessary
This helps to avoid Go race detector's warning
commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 15:28:19 2019 +0300
* rdns: refactor
commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 14:08:08 2019 +0300
Revert: * stats: serialize access to 'limit'
Use 'conf *Config' and update it atomically, as in querylog module.
(Note: Race detector still doesn't like it)
commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:50:23 2019 +0300
* config.dnsFilter -> Context.dnsFilter
commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:45:05 2019 +0300
* config.dnsServer -> Context.dnsServer
commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:42:10 2019 +0300
* config.dhcpServer -> Context.dhcpServer
commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:39:45 2019 +0300
* config.queryLog -> Context.queryLog
commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <[email protected]>
Date: Tue Dec 10 13:03:18 2019 +0300
* config.httpsServer -> Context.httpsServer
commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:12:24 2019 +0300
* config.httpServer -> Context.httpServer
commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 20:08:05 2019 +0300
* stats: serialize access to 'limit'
commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:57:04 2019 +0300
* config.stats -> Context.stats
commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <[email protected]>
Date: Mon Dec 9 19:45:23 2019 +0300
fix Restart()
... and 6 more commits | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
Subsets and Splits