Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: Add --whitelist option #352

Merged
merged 1 commit into from
Jul 25, 2017
Merged

config: Add --whitelist option #352

merged 1 commit into from
Jul 25, 2017

Conversation

dajohi
Copy link
Member

@dajohi dajohi commented Sep 20, 2016

The whitelist option is used to specify networks that will not be
banned.

Fixes #351

config.go Outdated
@@ -101,6 +101,7 @@ type config struct {
DisableBanning bool `long:"nobanning" description:"Disable banning of misbehaving peers"`
BanDuration time.Duration `long:"banduration" description:"How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second"`
BanThreshold uint32 `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."`
Whitelists []string `long:"whitelist" description:"Add a network that will not be banned. (eg. 192.168.1.1/32)"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only works with CIDR or can just an IP address also be used?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjepson
Copy link
Contributor

cjepson commented Sep 20, 2016

Does it work with IPv6 too?

@dajohi
Copy link
Member Author

dajohi commented Sep 21, 2016

@jrick CIDR only the way it is now. I could add single IP support if desired.

@dajohi
Copy link
Member Author

dajohi commented Sep 21, 2016

@cjepson yes

@cjepson
Copy link
Contributor

cjepson commented Sep 26, 2016

@dajohi Would prefer single IP support for ease of use.

@dajohi
Copy link
Member Author

dajohi commented Sep 26, 2016

This will be synced with btcd - btcsuite/btcd#769

@jcvernaleo
Copy link
Member

@dajohi so if this is planned on going in as part of a btcd sync after the similar commit goes into btcd maybe this PR should be closed (since it should not be accepted directly), right?

@dajohi
Copy link
Member Author

dajohi commented Sep 27, 2016

leaving open til the code is in dcrd

@alexlyp alexlyp added this to the 0.7.0 milestone Nov 3, 2016
@alexlyp
Copy link
Member

alexlyp commented Nov 3, 2016

Still leaving open for upcoming btcd sync that should include this.

@marcopeereboom marcopeereboom removed this from the 0.7.0 milestone Dec 15, 2016
@jrick
Copy link
Member

jrick commented Jun 29, 2017

Since we are backporting features we want from btcd instead of waiting for the sync, i'm ok with this going in.

It has merge conflicts however and needs a rebase.

@davecgh
Copy link
Member

davecgh commented Jun 29, 2017

The upstream version is waiting for updates as well. This is not ready to go in as is.

@dajohi
Copy link
Member Author

dajohi commented Jul 24, 2017

@jrick single ip support is in btcsuite/btcd#769

@davecgh
Copy link
Member

davecgh commented Jul 24, 2017

All concerns have been addressed.

@davecgh davecgh merged commit 4862714 into decred:master Jul 25, 2017
@dajohi dajohi deleted the issue_351 branch February 28, 2019 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants