docstring_tokens
stringlengths 0
76.5k
| code_tokens
stringlengths 75
1.81M
| label_window
sequencelengths 4
2.12k
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|---|
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
}
} | <mask> }
<mask> }
<mask> }
<mask>
<mask> newconfig.TLSv12Roots = Context.tlsRoots
<mask> newconfig.TLSCiphers = Context.tlsCiphers
<mask> newconfig.TLSAllowUnencryptedDOH = tlsConf.AllowUnencryptedDOH
<mask>
</s> 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 </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, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
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 | <mask> newconfig.TLSAllowUnencryptedDOH = tlsConf.AllowUnencryptedDOH
<mask>
<mask> newconfig.FilterHandler = applyAdditionalFiltering
<mask> newconfig.GetCustomUpstreamByClient = Context.clients.FindUpstreams
<mask> return newconfig
<mask> }
<mask>
<mask> type dnsEncryption struct {
<mask> https string
<mask> tls string
</s> 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 </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig() | <mask>
<mask> return nil
<mask> }
<mask>
<mask> func reconfigureDNSServer() error {
<mask> newconfig := generateServerConfig()
<mask> err := Context.dnsServer.Reconfigure(&newconfig)
<mask> if err != nil {
<mask> return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
<mask> }
<mask>
<mask> return nil
</s> 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 </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}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
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) | <mask> func reconfigureDNSServer() error {
<mask> newconfig := generateServerConfig()
<mask> err := Context.dnsServer.Reconfigure(&newconfig)
<mask> if err != nil {
<mask> return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
<mask> }
<mask>
<mask> return nil
<mask> }
<mask>
</s> 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 </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}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
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()); | <mask> dispatch(getVersion());
<mask> dispatch(getTlsStatus());
<mask> } catch (error) {
<mask> dispatch(addErrorToast({ error }));
<mask> dispatch(initSettingsFailure());
<mask> }
<mask> };
<mask>
<mask> export const enableDnsRequest = createAction('ENABLE_DNS_REQUEST');
<mask> export const enableDnsFailure = createAction('ENABLE_DNS_FAILURE');
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/actions/index.js |
dispatch(setUpstreamSuccess(config)); | <mask> ) || [];
<mask>
<mask> await apiClient.setUpstream(values);
<mask> dispatch(addSuccessToast('updated_upstream_dns_toast'));
<mask> dispatch(setUpstreamSuccess());
<mask> } catch (error) {
<mask> dispatch(addErrorToast({ error }));
<mask> dispatch(setUpstreamFailure());
<mask> }
<mask> };
</s> - client: fix upstream DNS servers form
Closes #1000 </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 }, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/actions/index.js |
const {
handleSubmit, submitting, invalid, processingSet,
} = props; | <mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import flow from 'lodash/flow';
<mask>
<mask> const Form = (props) => {
<mask> const { handleSubmit, submitting, invalid } = props;
<mask>
<mask> return (
<mask> <form onSubmit={handleSubmit}>
<mask> <div className="form__group mb-5">
<mask> <label className="form__label form__label--with-desc" htmlFor="allowed_clients">
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
disabled={processingSet} | <mask> type="text"
<mask> className="form-control form-control--textarea"
<mask> />
<mask> </div>
<mask> <div className="form__group mb-5">
<mask> <label className="form__label form__label--with-desc" htmlFor="disallowed_clients">
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
disabled={processingSet} | <mask> name="disallowed_clients"
<mask> component="textarea"
<mask> type="text"
<mask> className="form-control form-control--textarea"
<mask> />
<mask> </div>
<mask> <div className="form__group mb-5">
<mask> <label className="form__label form__label--with-desc" htmlFor="blocked_hosts">
</s> - client: fix upstream DNS servers form
Closes #1000 </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"
> | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
disabled={processingSet} | <mask> type="text"
<mask> className="form-control form-control--textarea"
<mask> />
<mask> </div>
<mask> <div className="card-actions">
<mask> <div className="btn-list">
<mask> <button
</s> - client: fix upstream DNS servers form
Closes #1000 </s> remove disabled={submitting || invalid}
</s> add disabled={submitting || invalid || processingSet} | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
disabled={submitting || invalid || processingSet} | <mask> <div className="btn-list">
<mask> <button
<mask> type="submit"
<mask> className="btn btn-success btn-standard"
<mask> disabled={submitting || invalid}
<mask> >
<mask> <Trans>save_config</Trans>
<mask> </button>
<mask> </div>
<mask> </div>
</s> - client: fix upstream DNS servers form
Closes #1000 </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"
> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired,
invalid: PropTypes.bool.isRequired,
initialValues: PropTypes.object.isRequired,
processingSet: PropTypes.bool.isRequired,
t: PropTypes.func.isRequired, | <mask> );
<mask> };
<mask>
<mask> Form.propTypes = {
<mask> handleSubmit: PropTypes.func,
<mask> submitting: PropTypes.bool,
<mask> invalid: PropTypes.bool,
<mask> initialValues: PropTypes.object,
<mask> t: PropTypes.func,
<mask> };
<mask>
<mask> export default flow([withNamespaces(), reduxForm({ form: 'accessForm' })])(Form);
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/Form.js |
const { processing, processingSet, ...values } = access; | <mask>
<mask> render() {
<mask> const { t, access } = this.props;
<mask>
<mask> const {
<mask> processing,
<mask> processingSet,
<mask> ...values
<mask> } = access;
<mask>
<mask> return (
<mask> <Card
<mask> title={t('access_title')}
<mask> subtitle={t('access_desc')}
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/index.js |
processingSet={processingSet} | <mask> <Form
<mask> initialValues={values}
<mask> onSubmit={this.handleFormSubmit}
<mask> />
<mask> </Card>
<mask> );
<mask> }
</s> - client: fix upstream DNS servers form
Closes #1000 </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, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Access/index.js |
disabled={processingSetUpstream || processingTestUpstream} | <mask> className="form-control form-control--textarea"
<mask> placeholder={t('upstream_dns')}
<mask> />
<mask> </div>
<mask> </div>
<mask> <div className="col-12">
<mask> <div className="form__group form__group--settings">
</s> - client: fix upstream DNS servers form
Closes #1000 </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"
> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
disabled={processingSetUpstream} | <mask> type="checkbox"
<mask> component={renderSelectField}
<mask> placeholder={t('upstream_parallel')}
<mask> />
<mask> </div>
<mask> </div>
<mask> <div className="col-12">
<mask> <Examples />
</s> - client: fix upstream DNS servers form
Closes #1000 </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"
> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
<label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
> | <mask> <hr />
<mask> </div>
<mask> <div className="col-12">
<mask> <div className="form__group">
<mask> <label className="form__label form__label--with-desc" htmlFor="bootstrap_dns">
<mask> <Trans>bootstrap_dns</Trans>
<mask> </label>
<mask> <div className="form__desc form__desc--top">
<mask> <Trans>bootstrap_dns_desc</Trans>
<mask> </div>
</s> - client: fix upstream DNS servers form
Closes #1000 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
className="form-control form-control--textarea form-control--textarea-small" | <mask> id="bootstrap_dns"
<mask> name="bootstrap_dns"
<mask> component="textarea"
<mask> type="text"
<mask> className="form-control"
<mask> placeholder={t('bootstrap_dns')}
<mask> />
<mask> </div>
<mask> </div>
<mask> </div>
</s> - client: fix upstream DNS servers form
Closes #1000 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
disabled={processingSetUpstream} | <mask> component="textarea"
<mask> type="text"
<mask> className="form-control form-control--textarea form-control--textarea-small"
<mask> placeholder={t('bootstrap_dns')}
<mask> />
<mask> </div>
<mask> </div>
<mask> </div>
</s> - client: fix upstream DNS servers form
Closes #1000 </s> remove className="form-control"
</s> add className="form-control form-control--textarea form-control--textarea-small" | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/Upstream/Form.js |
this.props.getDnsSettings(); | <mask>
<mask> class Dns extends Component {
<mask> componentDidMount() {
<mask> this.props.getAccessList();
<mask> this.props.getRewritesList();
<mask> }
<mask>
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/index.js |
const isDataLoading =
dashboard.processingDnsSettings || access.processing || rewrites.processing;
const isDataReady =
!dashboard.processingDnsSettings && !access.processing && !rewrites.processing;
| <mask> toggleRewritesModal,
<mask> } = this.props;
<mask>
<mask> return (
<mask> <Fragment>
<mask> <PageTitle title={t('dns_settings')} />
<mask> {isDataLoading && <Loading />}
<mask> {isDataReady && (
<mask> <Fragment>
</s> - client: fix upstream DNS servers form
Closes #1000 </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, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/index.js |
{isDataLoading && <Loading />}
{isDataReady && ( | <mask>
<mask> return (
<mask> <Fragment>
<mask> <PageTitle title={t('dns_settings')} />
<mask> {(dashboard.processing || access.processing) && <Loading />}
<mask> {!dashboard.processing && !access.processing && (
<mask> <Fragment>
<mask> <Upstream
<mask> upstreamDns={dashboard.upstreamDns}
<mask> bootstrapDns={dashboard.bootstrapDns}
<mask> allServers={dashboard.allServers}
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/index.js |
getDnsSettings: PropTypes.func.isRequired, | <mask> addRewrite: PropTypes.func.isRequired,
<mask> deleteRewrite: PropTypes.func.isRequired,
<mask> toggleRewritesModal: PropTypes.func.isRequired,
<mask> t: PropTypes.func.isRequired,
<mask> };
<mask>
<mask> export default withNamespaces()(Dns);
</s> - client: fix upstream DNS servers form
Closes #1000 </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 }, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Dns/index.js |
transition: 0.3s ease-in-out background-color;
}
.form-control--textarea-small {
min-height: 90px; | <mask>
<mask> .form-control--textarea {
<mask> min-height: 110px;
<mask> }
<mask>
<mask> .form-control--textarea-large {
<mask> min-height: 240px;
<mask> }
<mask>
</s> - client: fix upstream DNS servers form
Closes #1000 </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()); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/components/Settings/Settings.css |
import { handleUpstreamChange, setUpstream, testUpstream, getDnsSettings } from '../actions'; | <mask> import { connect } from 'react-redux';
<mask> import { handleUpstreamChange, setUpstream, testUpstream } from '../actions';
<mask> import { getAccessList, setAccessList } from '../actions/access';
<mask> import {
<mask> getRewritesList,
<mask> addRewrite,
<mask> deleteRewrite,
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/containers/Dns.js |
getDnsSettings, | <mask> getRewritesList,
<mask> addRewrite,
<mask> deleteRewrite,
<mask> toggleRewritesModal,
<mask> };
<mask>
<mask> export default connect(
<mask> mapStateToProps,
<mask> mapDispatchToProps,
<mask> )(Dns);
</s> - client: fix upstream DNS servers form
Closes #1000 </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()); | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/containers/Dns.js |
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; | <mask> import stats from './stats';
<mask> import queryLogs from './queryLogs';
<mask> import filtering from './filtering';
<mask>
<mask> const settings = handleActions({
<mask> [actions.initSettingsRequest]: state => ({ ...state, processing: true }),
<mask> [actions.initSettingsFailure]: state => ({ ...state, processing: false }),
<mask> [actions.initSettingsSuccess]: (state, { payload }) => {
<mask> const { settingsList } = payload;
<mask> const newState = { ...state, settingsList, processing: false };
<mask> return newState;
<mask> },
<mask> [actions.toggleSettingStatus]: (state, { payload }) => {
<mask> const { settingsList } = state;
<mask> const { settingKey } = payload;
<mask>
<mask> const setting = settingsList[settingKey];
<mask>
<mask> const newSetting = { ...setting, enabled: !setting.enabled };
<mask> const newSettingsList = { ...settingsList, [settingKey]: newSetting };
<mask> return { ...state, settingsList: newSettingsList };
<mask> },
<mask> [actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
<mask> [actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
<mask> [actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
<mask>
<mask> [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
<mask> [actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
<mask> [actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
<mask> }, {
</s> - client: fix upstream DNS servers form
Closes #1000 </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: {}, | [
"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"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const setting = settingsList[settingKey]; | <mask> [actions.setUpstreamRequest]: state => ({ ...state, processingUpstream: true }),
<mask> [actions.setUpstreamFailure]: state => ({ ...state, processingUpstream: false }),
<mask> [actions.setUpstreamSuccess]: state => ({ ...state, processingUpstream: false }),
<mask>
<mask> [actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
<mask> [actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
<mask> [actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
<mask> }, {
<mask> processing: true,
<mask> processingTestUpstream: false,
<mask> processingSetUpstream: false,
<mask> processingDhcpStatus: false,
<mask> settingsList: {},
<mask> });
<mask>
<mask> const dashboard = handleActions({
<mask> [actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
<mask> [actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
<mask> [actions.dnsStatusSuccess]: (state, { payload }) => {
</s> - client: fix upstream DNS servers form
Closes #1000 </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: {}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
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 }) => ({ | <mask> processingDhcpStatus: false,
<mask> settingsList: {},
<mask> });
<mask>
<mask> const dashboard = handleActions({
<mask> [actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
<mask> [actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
<mask> [actions.dnsStatusSuccess]: (state, { payload }) => {
<mask> const {
<mask> version,
<mask> running,
<mask> dns_port: dnsPort,
<mask> dns_addresses: dnsAddresses,
<mask> upstream_dns: upstreamDns,
<mask> bootstrap_dns: bootstrapDns,
<mask> all_servers: allServers,
<mask> protection_enabled: protectionEnabled,
<mask> language,
<mask> http_port: httpPort,
<mask> } = payload;
<mask> const newState = {
<mask> ...state,
<mask> isCoreRunning: running,
<mask> processing: false,
<mask> dnsVersion: version,
<mask> dnsPort,
</s> - client: fix upstream DNS servers form
Closes #1000 </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]; | [
"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"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
...payload,
processingSetUpstream: false,
}), | <mask> http_port: httpPort,
<mask> } = payload;
<mask> const newState = {
<mask> ...state,
<mask> isCoreRunning: running,
<mask> processing: false,
<mask> dnsVersion: version,
<mask> dnsPort,
<mask> dnsAddresses,
<mask> upstreamDns: upstreamDns.join('\n'),
<mask> bootstrapDns: bootstrapDns.join('\n'),
<mask> allServers,
<mask> protectionEnabled,
<mask> language,
<mask> httpPort,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.enableDnsRequest]: state => ({ ...state, processing: true }),
<mask> [actions.enableDnsFailure]: state => ({ ...state, processing: false }),
<mask> [actions.enableDnsSuccess]: (state) => {
<mask> const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
</s> - client: fix upstream DNS servers form
Closes #1000 </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,
};
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }), | <mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.enableDnsRequest]: state => ({ ...state, processing: true }),
<mask> [actions.enableDnsFailure]: state => ({ ...state, processing: false }),
<mask> [actions.enableDnsSuccess]: (state) => {
<mask> const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.disableDnsRequest]: state => ({ ...state, processing: true }),
<mask> [actions.disableDnsFailure]: state => ({ ...state, processing: false }),
<mask> [actions.disableDnsSuccess]: (state) => {
</s> - client: fix upstream DNS servers form
Closes #1000 </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 }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
{
processing: true,
processingTestUpstream: false,
processingSetUpstream: false,
processingDhcpStatus: false,
settingsList: {}, | <mask> [actions.enableDnsSuccess]: (state) => {
<mask> const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.disableDnsRequest]: state => ({ ...state, processing: true }),
<mask> [actions.disableDnsFailure]: state => ({ ...state, processing: false }),
<mask> [actions.disableDnsSuccess]: (state) => {
<mask> const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
<mask> [actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
<mask> [actions.getVersionSuccess]: (state, { payload }) => {
</s> - client: fix upstream DNS servers form
Closes #1000 </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 };
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
); | <mask> processingSetUpstream: false,
<mask> processingDhcpStatus: false,
<mask> settingsList: {},
<mask> },
<mask>
<mask> const dashboard = handleActions(
<mask> {
<mask> [actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
<mask> [actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const dashboard = handleActions(
{
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
[actions.dnsStatusSuccess]: (state, { payload }) => { | <mask> const newState = { ...state, isCoreRunning: !state.isCoreRunning, processing: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
<mask> [actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
<mask> [actions.getVersionSuccess]: (state, { payload }) => {
<mask> const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
<mask>
<mask> if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
<mask> const {
<mask> announcement_url: announcementUrl,
<mask> new_version: newVersion,
<mask> can_autoupdate: canAutoUpdate,
<mask> } = payload;
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
version,
running,
dns_port: dnsPort,
dns_addresses: dnsAddresses,
upstream_dns: upstreamDns,
bootstrap_dns: bootstrapDns,
all_servers: allServers,
protection_enabled: protectionEnabled,
language,
http_port: httpPort, | <mask> const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
<mask>
<mask> if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
<mask> const {
<mask> announcement_url: announcementUrl,
<mask> new_version: newVersion,
<mask> can_autoupdate: canAutoUpdate,
<mask> } = payload;
<mask>
<mask> const newState = {
<mask> ...state,
<mask> announcementUrl,
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
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, | <mask> } = payload;
<mask>
<mask> const newState = {
<mask> ...state,
<mask> announcementUrl,
<mask> newVersion,
<mask> canAutoUpdate,
<mask> isUpdateAvailable: true,
<mask> processingVersion: false,
<mask> };
<mask> return newState;
<mask> }
<mask>
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
},
[actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
[actions.getUpdateSuccess]: (state) => {
const newState = { ...state, processingUpdate: false }; | <mask> processingVersion: false,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
<mask> [actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
<mask> [actions.toggleProtectionSuccess]: (state) => {
</s> - client: fix upstream DNS servers form
Closes #1000 </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 }), | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
}, | <mask> isUpdateAvailable: true,
<mask> processingVersion: false,
<mask> };
<mask> return newState;
<mask> }
<mask>
<mask> return {
<mask> ...state,
<mask> processingVersion: false,
<mask> };
</s> - client: fix upstream DNS servers form
Closes #1000 </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: [],
},
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[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;
}, | <mask> };
<mask> return newState;
<mask> }
<mask>
<mask> return {
<mask> ...state,
<mask> processingVersion: false,
<mask> };
<mask> },
<mask>
<mask> [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
<mask> [actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
<mask> [actions.getUpdateSuccess]: (state) => {
<mask> const newState = { ...state, processingUpdate: false };
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[actions.handleUpstreamChange]: (state, { payload }) => {
const { upstreamDns } = payload;
return { ...state, upstreamDns };
}, | <mask> processingVersion: false,
<mask> };
<mask> },
<mask>
<mask> [actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
<mask> [actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
<mask> [actions.getUpdateSuccess]: (state) => {
<mask> const newState = { ...state, processingUpdate: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
<mask> [actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
<mask> [actions.toggleProtectionSuccess]: (state) => {
<mask> const newState = {
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
}, | <mask> const newState = { ...state, processingUpdate: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
<mask> [actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
<mask> [actions.toggleProtectionSuccess]: (state) => {
<mask> const newState = {
<mask> ...state,
<mask> protectionEnabled: !state.protectionEnabled,
<mask> processingProtection: false,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.handleUpstreamChange]: (state, { payload }) => {
<mask> const { upstreamDns } = payload;
<mask> return { ...state, upstreamDns };
<mask> },
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[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;
}, | <mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.handleUpstreamChange]: (state, { payload }) => {
<mask> const { upstreamDns } = payload;
<mask> return { ...state, upstreamDns };
<mask> },
<mask>
<mask> [actions.getLanguageSuccess]: (state, { payload }) => {
<mask> const newState = { ...state, language: payload };
<mask> return newState;
<mask> },
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[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; | <mask> const { upstreamDns } = payload;
<mask> return { ...state, upstreamDns };
<mask> },
<mask>
<mask> [actions.getLanguageSuccess]: (state, { payload }) => {
<mask> const newState = { ...state, language: payload };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
<mask> [actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
<mask> [actions.getClientsSuccess]: (state, { payload }) => {
<mask> const newState = {
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
return {
...state,
allServers,
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
processingDnsSettings: false,
};
}, | <mask> const newState = { ...state, language: payload };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
<mask> [actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
<mask> [actions.getClientsSuccess]: (state, { payload }) => {
<mask> const newState = {
<mask> ...state,
<mask> clients: payload.clients,
<mask> autoClients: payload.autoClients,
<mask> processingClients: false,
<mask> };
<mask> return newState;
<mask> },
<mask> }, {
<mask> processing: true,
<mask> isCoreRunning: false,
<mask> processingVersion: true,
</s> - client: fix upstream DNS servers form
Closes #1000 </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, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
{
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: [],
},
); | <mask> processingClients: false,
<mask> };
<mask> return newState;
<mask> },
<mask> }, {
<mask> processing: true,
<mask> isCoreRunning: false,
<mask> processingVersion: true,
<mask> processingFiltering: true,
<mask> processingClients: true,
<mask> processingUpdate: false,
<mask> upstreamDns: '',
<mask> bootstrapDns: '',
<mask> allServers: false,
<mask> protectionEnabled: false,
<mask> processingProtection: false,
<mask> httpPort: 80,
<mask> dnsPort: 53,
<mask> dnsAddresses: [],
<mask> dnsVersion: '',
<mask> clients: [],
<mask> autoClients: [],
<mask> });
<mask>
<mask> const dhcp = handleActions({
<mask> [actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
<mask> [actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
<mask> [actions.getDhcpStatusSuccess]: (state, { payload }) => {
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"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"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
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; | <mask> clients: [],
<mask> autoClients: [],
<mask> });
<mask>
<mask> const dhcp = handleActions({
<mask> [actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
<mask> [actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
<mask> [actions.getDhcpStatusSuccess]: (state, { payload }) => {
<mask> const {
<mask> static_leases: staticLeases,
<mask> ...values
<mask> } = payload;
<mask>
<mask> const newState = {
<mask> ...state,
<mask> staticLeases,
<mask> processing: false,
</s> - client: fix upstream DNS servers form
Closes #1000 </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]; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const newState = {
...state,
staticLeases,
processing: false,
...values,
}; | <mask> static_leases: staticLeases,
<mask> ...values
<mask> } = payload;
<mask>
<mask> const newState = {
<mask> ...state,
<mask> staticLeases,
<mask> processing: false,
<mask> ...values,
<mask> };
<mask>
<mask> return newState;
<mask> },
<mask>
<mask> [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
</s> - client: fix upstream DNS servers form
Closes #1000 </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, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
return newState;
}, | <mask> processing: false,
<mask> ...values,
<mask> };
<mask>
<mask> return newState;
<mask> },
<mask>
<mask> [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
<mask> [actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
<mask> [actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
<mask> const newState = {
</s> - client: fix upstream DNS servers form
Closes #1000 </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: {}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[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;
}, | <mask>
<mask> return newState;
<mask> },
<mask>
<mask> [actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
<mask> [actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
<mask> [actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
<mask> const newState = {
<mask> ...state,
<mask> interfaces: payload,
<mask> processingInterfaces: false,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
<mask> [actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
<mask> [actions.findActiveDhcpSuccess]: (state, { payload }) => {
<mask> const {
</s> - client: fix upstream DNS servers form
Closes #1000 </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 };
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
const { other_server: otherServer, static_ip: staticIP } = payload; | <mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
<mask> [actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
<mask> [actions.findActiveDhcpSuccess]: (state, { payload }) => {
<mask> const {
<mask> other_server: otherServer,
<mask> static_ip: staticIP,
<mask> } = payload;
<mask>
<mask> const newState = {
<mask> ...state,
<mask> check: {
<mask> otherServer,
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
const newState = {
...state,
check: {
otherServer,
staticIP,
},
processingStatus: false,
};
return newState;
}, | <mask> other_server: otherServer,
<mask> static_ip: staticIP,
<mask> } = payload;
<mask>
<mask> const newState = {
<mask> ...state,
<mask> check: {
<mask> otherServer,
<mask> staticIP,
<mask> },
<mask> processingStatus: false,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
<mask> [actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
<mask> [actions.toggleDhcpSuccess]: (state) => {
<mask> const { config } = state;
</s> - client: fix upstream DNS servers form
Closes #1000 </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 };
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[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;
}, | <mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
<mask> [actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
<mask> [actions.toggleDhcpSuccess]: (state) => {
<mask> const { config } = state;
<mask> const newConfig = { ...config, enabled: !config.enabled };
<mask> const newState = {
<mask> ...state, config: newConfig, check: null, processingDhcp: false,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
<mask> [actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
<mask> [actions.setDhcpConfigSuccess]: (state, { payload }) => {
<mask> const { config } = state;
</s> - client: fix upstream DNS servers form
Closes #1000 </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 };
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[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;
}, | <mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
<mask> [actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
<mask> [actions.setDhcpConfigSuccess]: (state, { payload }) => {
<mask> const { config } = state;
<mask> const newConfig = { ...config, ...payload };
<mask> const newState = { ...state, config: newConfig, processingConfig: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.toggleLeaseModal]: (state) => {
<mask> const newState = {
<mask> ...state,
<mask> isModalOpen: !state.isModalOpen,
</s> - client: fix upstream DNS servers form
Closes #1000 </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 };
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
}, | <mask> const newState = { ...state, config: newConfig, processingConfig: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.toggleLeaseModal]: (state) => {
<mask> const newState = {
<mask> ...state,
<mask> isModalOpen: !state.isModalOpen,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
<mask> [actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
<mask> [actions.addStaticLeaseSuccess]: (state, { payload }) => {
<mask> const {
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[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;
}, | <mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
<mask> [actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
<mask> [actions.addStaticLeaseSuccess]: (state, { payload }) => {
<mask> const {
<mask> ip, mac, hostname,
<mask> } = payload;
<mask> const newLease = {
<mask> ip,
<mask> mac,
<mask> hostname: hostname || '',
<mask> };
<mask> const leases = [...state.staticLeases, newLease];
<mask> const newState = {
<mask> ...state,
<mask> staticLeases: leases,
<mask> processingAdding: false,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
<mask> [actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
<mask> [actions.removeStaticLeaseSuccess]: (state, { payload }) => {
<mask> const leaseToRemove = payload.ip;
</s> - client: fix upstream DNS servers form
Closes #1000 </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 };
}, | [
"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"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
[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;
}, | <mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
<mask> [actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
<mask> [actions.removeStaticLeaseSuccess]: (state, { payload }) => {
<mask> const leaseToRemove = payload.ip;
<mask> const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
<mask> const newState = {
<mask> ...state,
<mask> staticLeases: leases,
<mask> processingDeleting: false,
<mask> };
<mask> return newState;
<mask> },
<mask> }, {
<mask> processing: true,
<mask> processingStatus: false,
<mask> processingInterfaces: false,
</s> - client: fix upstream DNS servers form
Closes #1000 </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: {}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
{
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false, | <mask> processingDeleting: false,
<mask> };
<mask> return newState;
<mask> },
<mask> }, {
<mask> processing: true,
<mask> processingStatus: false,
<mask> processingInterfaces: false,
<mask> processingDhcp: false,
<mask> processingConfig: false,
<mask> processingAdding: false,
<mask> processingDeleting: false,
<mask> config: {
<mask> enabled: false,
<mask> },
<mask> check: null,
<mask> leases: [],
<mask> staticLeases: [],
<mask> isModalOpen: false,
</s> - client: fix upstream DNS servers form
Closes #1000 </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;
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
); | <mask> processingDeleting: false,
<mask> config: {
<mask> enabled: false,
<mask> },
<mask> check: null,
<mask> leases: [],
<mask> staticLeases: [],
<mask> isModalOpen: false,
<mask> });
<mask>
<mask> export default combineReducers({
<mask> settings,
<mask> dashboard,
<mask> queryLogs,
</s> - client: fix upstream DNS servers form
Closes #1000 </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; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a26ee422403d78a1e1ef56270deb11b6e646156 | client/src/reducers/index.js |
<mask> package dnsforward
<mask>
<mask> import (
<mask> "crypto/tls"
<mask> "errors"
<mask> "fmt"
<mask> "net"
<mask> "net/http"
<mask> "runtime"
<mask> "strings"
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
|
// DNS proxy instance for internal usage
// We don't Start() it and so no listen port is required.
internalProxy *proxy.Proxy
| <mask> stats stats.Stats
<mask> access *accessCtx
<mask>
<mask> webRegistered bool
<mask> isRunning bool
<mask>
<mask> sync.RWMutex
<mask> conf ServerConfig
</s> 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 </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() | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
isRunning bool | <mask> internalProxy *proxy.Proxy
<mask>
<mask> webRegistered bool
<mask>
<mask> sync.RWMutex
<mask> conf ServerConfig
<mask> }
<mask>
</s> 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 </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 | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
s.dnsProxy = nil | <mask> s.Lock()
<mask> s.dnsFilter = nil
<mask> s.stats = nil
<mask> s.queryLog = nil
<mask> s.Unlock()
<mask> }
<mask>
<mask> // WriteDiskConfig - write configuration
<mask> func (s *Server) WriteDiskConfig(c *FilteringConfig) {
<mask> s.Lock()
</s> 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 </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 { | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
func (s *Server) Start() error { | <mask> FilteringConfig: FilteringConfig{BlockedResponseTTL: 3600},
<mask> }
<mask>
<mask> // Start starts the DNS server
<mask> func (s *Server) Start(config *ServerConfig) error {
<mask> s.Lock()
<mask> defer s.Unlock()
<mask> return s.startInternal(config)
<mask> }
<mask>
</s> 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 </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 { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
return s.startInternal() | <mask> // Start starts the DNS server
<mask> func (s *Server) Start(config *ServerConfig) error {
<mask> s.Lock()
<mask> defer s.Unlock()
<mask> return s.startInternal(config)
<mask> }
<mask>
<mask> // startInternal starts without locking
<mask> func (s *Server) startInternal(config *ServerConfig) error {
<mask> err := s.prepare(config)
</s> 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 </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
func (s *Server) startInternal() error {
err := s.dnsProxy.Start()
if err == nil {
s.isRunning = true | <mask> return s.startInternal(config)
<mask> }
<mask>
<mask> // startInternal starts without locking
<mask> func (s *Server) startInternal(config *ServerConfig) error {
<mask> err := s.prepare(config)
<mask> if err != nil {
<mask> return err
<mask> }
<mask> return s.dnsProxy.Start()
<mask> }
<mask>
<mask> // Prepare the object
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
return err | <mask> err := s.prepare(config)
<mask> if err != nil {
<mask> return err
<mask> }
<mask> return s.dnsProxy.Start()
<mask> }
<mask>
<mask> // Prepare the object
<mask> func (s *Server) prepare(config *ServerConfig) error {
<mask> if s.dnsProxy != nil {
</s> 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 </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
func (s *Server) Prepare(config *ServerConfig) error { | <mask> return s.dnsProxy.Start()
<mask> }
<mask>
<mask> // Prepare the object
<mask> func (s *Server) prepare(config *ServerConfig) error {
<mask> if s.dnsProxy != nil {
<mask> return errors.New("DNS server is already started")
<mask> }
<mask>
<mask> if config != nil {
<mask> s.conf = *config
<mask> }
<mask>
<mask> if len(s.conf.UpstreamDNS) == 0 {
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
intlProxyConfig := proxy.Config{
CacheEnabled: true,
CacheSizeBytes: 4096,
Upstreams: s.conf.Upstreams,
DomainsReservedUpstreams: s.conf.DomainsReservedUpstreams,
}
s.internalProxy = &proxy.Proxy{Config: intlProxyConfig}
| <mask> }
<mask>
<mask> s.access = &accessCtx{}
<mask> err = s.access.Init(s.conf.AllowedClients, s.conf.DisallowedClients, s.conf.BlockedHosts)
<mask> if err != nil {
<mask> return err
</s> 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 </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 { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
<mask> // stopInternal stops without locking
<mask> func (s *Server) stopInternal() error {
<mask> if s.dnsProxy != nil {
<mask> err := s.dnsProxy.Stop()
<mask> s.dnsProxy = nil
<mask> if err != nil {
<mask> return errorx.Decorate(err, "could not stop the DNS server properly")
<mask> }
<mask> }
<mask>
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
|
s.isRunning = false | <mask> }
<mask> }
<mask>
<mask> return nil
<mask> }
<mask>
<mask> // IsRunning returns true if the DNS server is running
<mask> func (s *Server) IsRunning() bool {
</s> 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 </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 | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
defer s.RUnlock()
return s.isRunning | <mask>
<mask> // IsRunning returns true if the DNS server is running
<mask> func (s *Server) IsRunning() bool {
<mask> s.RLock()
<mask> isRunning := true
<mask> if s.dnsProxy == nil {
<mask> isRunning = false
<mask> }
<mask> s.RUnlock()
<mask> return isRunning
<mask> }
<mask>
<mask> // Restart - restart server
<mask> func (s *Server) Restart() error {
<mask> s.Lock()
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
err = s.startInternal() | <mask> err := s.stopInternal()
<mask> if err != nil {
<mask> return errorx.Decorate(err, "could not reconfigure the server")
<mask> }
<mask> err = s.startInternal(nil)
<mask> if err != nil {
<mask> return errorx.Decorate(err, "could not reconfigure the server")
<mask> }
<mask>
<mask> return nil
</s> 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 </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
err = s.Prepare(config)
if err != nil {
return errorx.Decorate(err, "could not reconfigure the server")
}
err = s.startInternal() | <mask> if runtime.GOOS == "windows" {
<mask> time.Sleep(1 * time.Second)
<mask> }
<mask>
<mask> err = s.startInternal(config)
<mask> if err != nil {
<mask> return errorx.Decorate(err, "could not reconfigure the server")
<mask> }
<mask>
<mask> return nil
</s> 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 </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward.go |
err := s.Start() | <mask> )
<mask>
<mask> func TestServer(t *testing.T) {
<mask> s := createTestServer(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask>
<mask> // message over UDP
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask>
<mask> func TestServerWithProtectionDisabled(t *testing.T) {
<mask> s := createTestServer(t)
<mask> s.conf.ProtectionEnabled = false
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask>
<mask> // message over UDP
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
_ = s.Prepare(nil) | <mask> }
<mask>
<mask> // Starting the server
<mask> err := s.Start()
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
</s> 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 </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() | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask> PrivateKeyData: keyPem,
<mask> }
<mask>
<mask> // Starting the server
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask>
<mask> // Add our self-signed generated config to roots
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask> }
<mask>
<mask> func TestServerRace(t *testing.T) {
<mask> s := createTestServer(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask>
<mask> // message over UDP
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask> }
<mask>
<mask> func TestSafeSearch(t *testing.T) {
<mask> s := createTestServer(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask>
<mask> // Test safe search for yandex. We already know safe search ip
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask> }
<mask>
<mask> func TestInvalidRequest(t *testing.T) {
<mask> s := createTestServer(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask>
<mask> // server is running, send a message
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask> }
<mask>
<mask> func TestBlockedRequest(t *testing.T) {
<mask> s := createTestServer(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask> addr := s.dnsProxy.Addr(proxy.ProtoUDP)
<mask>
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Prepare(nil) | <mask>
<mask> func (s *Server) startWithUpstream(u upstream.Upstream) error {
<mask> s.Lock()
<mask> defer s.Unlock()
<mask> err := s.prepare(nil)
<mask> if err != nil {
<mask> return err
<mask> }
<mask> s.dnsProxy.Upstreams = []upstream.Upstream{u}
<mask> return s.dnsProxy.Start()
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask>
<mask> func TestNullBlockedRequest(t *testing.T) {
<mask> s := createTestServer(t)
<mask> s.conf.FilteringConfig.BlockingMode = "null_ip"
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask> addr := s.dnsProxy.Addr(proxy.ProtoUDP)
<mask>
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask> }
<mask>
<mask> func TestBlockedByHosts(t *testing.T) {
<mask> s := createTestServer(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask> addr := s.dnsProxy.Addr(proxy.ProtoUDP)
<mask>
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Start() | <mask> }
<mask>
<mask> func TestBlockedBySafeBrowsing(t *testing.T) {
<mask> s := createTestServer(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
<mask> addr := s.dnsProxy.Addr(proxy.ProtoUDP)
<mask>
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
err := s.Prepare(nil)
assert.True(t, err == nil) | <mask> s.conf.UpstreamDNS = []string{"8.8.8.8:53", "8.8.4.4:53"}
<mask> s.conf.FilteringConfig.ProtectionEnabled = true
<mask> return s
<mask> }
<mask>
<mask> func createServerTLSConfig(t *testing.T) (*tls.Config, []byte, []byte) {
<mask> privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
</s> 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 </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() | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | dnsforward/dnsforward_test.go |
github.com/AdguardTeam/dnsproxy v0.23.0 | <mask>
<mask> go 1.13
<mask>
<mask> require (
<mask> github.com/AdguardTeam/dnsproxy v0.22.0
<mask> github.com/AdguardTeam/golibs v0.3.0
<mask> github.com/AdguardTeam/urlfilter v0.7.0
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/etcd-io/bbolt v1.3.3
<mask> github.com/go-test/deep v1.0.4 // indirect
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | go.mod |
github.com/AdguardTeam/dnsproxy v0.23.0 h1:GrOUapcWjf19MF8NznZUbcYujBbl7QXapBWTFKqkJQg=
github.com/AdguardTeam/dnsproxy v0.23.0/go.mod h1:2qy8rpdfBzKgMPxkHmPdaNK4XZJ322v4KtVGI8s8Bn0= | <mask> github.com/AdguardTeam/dnsproxy v0.22.0 h1:8mpPu+KN0puFTHNhGy7XQ13fe3+3DGFaiwnqhNMWl+M=
<mask> github.com/AdguardTeam/dnsproxy v0.22.0/go.mod h1:2qy8rpdfBzKgMPxkHmPdaNK4XZJ322v4KtVGI8s8Bn0=
<mask> github.com/AdguardTeam/golibs v0.2.4 h1:GUssokegKxKF13K67Pgl0ZGwqHjNN6X7sep5ik6ORdY=
<mask> github.com/AdguardTeam/golibs v0.2.4/go.mod h1:R3M+mAg3nWG4X4Hsag5eef/TckHFH12ZYhK7AzJc8+U=
<mask> github.com/AdguardTeam/golibs v0.3.0 h1:1zO8ulGEOdXDDM++Ap4sYfTsT/Z4tZBZtiWSA4ykcOU=
<mask> github.com/AdguardTeam/golibs v0.3.0/go.mod h1:R3M+mAg3nWG4X4Hsag5eef/TckHFH12ZYhK7AzJc8+U=
<mask> github.com/AdguardTeam/gomitmproxy v0.1.2/go.mod h1:Mrt/3EfiXIYY2aZ7KsLuCUJzUARD/fWJ119IfzOB13M=
</s> 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 </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 { | [
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | go.sum |
clients.lock.Lock()
for _, cli := range clients.list { | <mask> }
<mask>
<mask> // WriteDiskConfig - write configuration
<mask> func (clients *clientsContainer) WriteDiskConfig(objects *[]clientObject) {
<mask> clientsList := clients.GetList()
<mask> for _, cli := range clientsList {
<mask> cy := clientObject{
<mask> Name: cli.Name,
<mask> IDs: cli.IDs,
<mask> UseGlobalSettings: !cli.UseOwnSettings,
<mask> FilteringEnabled: cli.FilteringEnabled,
</s> 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 </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
Name: cli.Name,
UseGlobalSettings: !cli.UseOwnSettings,
FilteringEnabled: cli.FilteringEnabled,
ParentalEnabled: cli.ParentalEnabled,
SafeSearchEnabled: cli.SafeSearchEnabled,
SafeBrowsingEnabled: cli.SafeBrowsingEnabled, | <mask> func (clients *clientsContainer) WriteDiskConfig(objects *[]clientObject) {
<mask> clientsList := clients.GetList()
<mask> for _, cli := range clientsList {
<mask> cy := clientObject{
<mask> Name: cli.Name,
<mask> IDs: cli.IDs,
<mask> UseGlobalSettings: !cli.UseOwnSettings,
<mask> FilteringEnabled: cli.FilteringEnabled,
<mask> ParentalEnabled: cli.ParentalEnabled,
<mask> SafeSearchEnabled: cli.SafeSearchEnabled,
<mask> SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
<mask>
<mask> UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
<mask> BlockedServices: cli.BlockedServices,
<mask>
<mask> Upstreams: cli.Upstreams,
<mask> }
</s> 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 </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
<mask> SafeSearchEnabled: cli.SafeSearchEnabled,
<mask> SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
<mask>
<mask> UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
<mask> BlockedServices: cli.BlockedServices,
<mask>
<mask> Upstreams: cli.Upstreams,
<mask> }
<mask> *objects = append(*objects, cy)
<mask> }
<mask> }
<mask>
</s> 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 </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
|
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)
| <mask> SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
<mask> UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
<mask> }
<mask> *objects = append(*objects, cy)
<mask> }
<mask> clients.lock.Unlock()
<mask> }
<mask>
</s> 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 </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) | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
clients.lock.Unlock() | <mask> *objects = append(*objects, cy)
<mask> }
<mask> }
<mask>
<mask> func (clients *clientsContainer) periodicUpdate() {
<mask> for {
<mask> clients.addFromHostsFile()
<mask> clients.addFromSystemARP()
</s> 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 </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 { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
<mask> time.Sleep(clientsUpdatePeriod)
<mask> }
<mask> }
<mask>
<mask> // GetList returns the pointer to clients list
<mask> func (clients *clientsContainer) GetList() map[string]*Client {
<mask> return clients.list
<mask> }
<mask>
<mask> // Exists checks if client with this IP already exists
<mask> func (clients *clientsContainer) Exists(ip string, source clientSource) bool {
<mask> clients.lock.Lock()
<mask> defer clients.lock.Unlock()
<mask>
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/clients.go |
|
// HTTPSServer - HTTPS Server | <mask> Verbose bool `yaml:"verbose"` // If true, verbose logging is enabled
<mask> }
<mask>
<mask> type HTTPSServer struct {
<mask> server *http.Server
<mask> cond *sync.Cond // reacts to config.TLS.Enabled, PortHTTPS, CertificateChain and PrivateKey
<mask> sync.Mutex // protects config.TLS
<mask> shutdown bool // if TRUE, don't restart the server
</s> 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 </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 | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
<mask> // runningAsService flag is set to true when options are passed from the service runner
<mask> runningAsService bool
<mask> disableUpdate bool // If set, don't check for updates
<mask> appSignalChannel chan os.Signal
<mask> clients clientsContainer // per-client-settings module
<mask> controlLock sync.Mutex
<mask> transport *http.Transport
<mask> client *http.Client
<mask> stats stats.Stats // statistics module
<mask> queryLog querylog.QueryLog // query log module
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
|
auth *Auth // HTTP authentication module | <mask> clients clientsContainer // per-client-settings module
<mask> controlLock sync.Mutex
<mask> transport *http.Transport
<mask> client *http.Client
<mask> stats stats.Stats // statistics module
<mask> queryLog querylog.QueryLog // query log module
<mask> auth *Auth // HTTP authentication module
<mask>
<mask> // cached version.json to avoid hammering github.io for each page reload
<mask> versionCheckJSON []byte
<mask> versionCheckLastTime time.Time
<mask>
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
<mask> // cached version.json to avoid hammering github.io for each page reload
<mask> versionCheckJSON []byte
<mask> versionCheckLastTime time.Time
<mask>
<mask> dnsctx dnsContext
<mask> dnsFilter *dnsfilter.Dnsfilter
<mask> dnsServer *dnsforward.Server
<mask> dhcpServer *dhcpd.Server
<mask> httpServer *http.Server
<mask> httpsServer HTTPSServer
<mask>
<mask> BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
<mask> BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
<mask> Users []User `yaml:"users"` // Users that can access HTTP server
<mask> Language string `yaml:"language"` // two-letter ISO 639-1 language code
<mask> RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
</s> 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 </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() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
|
Context.clients.WriteDiskConfig(&config.Clients) | <mask> func (c *configuration) write() error {
<mask> c.Lock()
<mask> defer c.Unlock()
<mask>
<mask> config.clients.WriteDiskConfig(&config.Clients)
<mask>
<mask> if config.auth != nil {
<mask> config.Users = config.auth.GetUsers()
<mask> }
<mask>
</s> 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 </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 { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |
if Context.stats != nil { | <mask> if config.auth != nil {
<mask> config.Users = config.auth.GetUsers()
<mask> }
<mask>
<mask> if config.stats != nil {
<mask> sdc := stats.DiskConfig{}
<mask> config.stats.WriteDiskConfig(&sdc)
<mask> config.DNS.StatsInterval = sdc.Interval
<mask> }
<mask>
</s> 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 </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e | home/config.go |