-
Notifications
You must be signed in to change notification settings - Fork 70
Clean up proxy feature
#182
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
Open
ValuedMammal
wants to merge
5
commits into
bitcoindevkit:master
Choose a base branch
from
ValuedMammal:build/feature_proxy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d2347cc
build: Clean up "proxy" feature
ValuedMammal b4fac80
build: remove "default" feature gating
ValuedMammal 64b20d1
build: move away from "use-" feature naming
ValuedMammal ce7a0eb
build: Remove unused "minimal" feature
ValuedMammal 51cfd77
build!: Always implement `calls_made`
ValuedMammal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| //! plaintext connections over a socks proxy, useful for Onion servers. Using different features, | ||
| //! the SSL implementation can be removed or replaced with [`openssl`](https://docs.rs/openssl). | ||
| //! | ||
| //! A `minimal` configuration is also provided, which only includes the plaintext TCP client. | ||
| //! For a minimal configuration the library can be built with `--no-default-features`, which only includes the plaintext TCP client. | ||
| //! | ||
| //! # Example | ||
| //! | ||
|
|
@@ -22,46 +22,31 @@ | |
| pub extern crate bitcoin; | ||
| extern crate core; | ||
| extern crate log; | ||
| #[cfg(feature = "use-openssl")] | ||
| #[cfg(feature = "openssl")] | ||
| extern crate openssl; | ||
| #[cfg(all( | ||
| any( | ||
| feature = "default", | ||
| feature = "use-rustls", | ||
| feature = "use-rustls-ring" | ||
| ), | ||
| not(feature = "use-openssl") | ||
| ))] | ||
| #[cfg(any(feature = "rustls", feature = "rustls-ring"))] | ||
| extern crate rustls; | ||
| extern crate serde; | ||
| extern crate serde_json; | ||
|
|
||
| #[cfg(any( | ||
| feature = "default", | ||
| feature = "use-rustls", | ||
| feature = "use-rustls-ring" | ||
| ))] | ||
| #[cfg(any(feature = "rustls", feature = "rustls-ring"))] | ||
| extern crate webpki_roots; | ||
|
|
||
| #[cfg(any(feature = "default", feature = "proxy"))] | ||
| #[cfg(feature = "proxy")] | ||
| extern crate byteorder; | ||
|
|
||
| #[cfg(all(unix, any(feature = "default", feature = "proxy")))] | ||
| #[cfg(all(unix, feature = "proxy"))] | ||
| extern crate libc; | ||
| #[cfg(all(windows, any(feature = "default", feature = "proxy")))] | ||
| #[cfg(all(windows, feature = "proxy"))] | ||
| extern crate winapi; | ||
|
|
||
| #[cfg(any(feature = "default", feature = "proxy"))] | ||
| #[cfg(feature = "proxy")] | ||
| pub mod socks; | ||
|
|
||
| mod api; | ||
| mod batch; | ||
|
|
||
| #[cfg(any( | ||
| all(feature = "proxy", feature = "use-openssl"), | ||
| all(feature = "proxy", feature = "use-rustls"), | ||
| all(feature = "proxy", feature = "use-rustls-ring") | ||
| ))] | ||
| #[cfg(any(feature = "openssl", feature = "rustls", feature = "rustls-ring"))] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was trying to test the client usage through plaintext (with --no-default-features), but it's not possible due to the way we have these features here. It wasn't even working on master, though. |
||
| pub mod client; | ||
|
|
||
| mod config; | ||
|
|
@@ -73,11 +58,7 @@ pub mod utils; | |
|
|
||
| pub use api::ElectrumApi; | ||
| pub use batch::Batch; | ||
| #[cfg(any( | ||
| all(feature = "proxy", feature = "use-openssl"), | ||
| all(feature = "proxy", feature = "use-rustls"), | ||
| all(feature = "proxy", feature = "use-rustls-ring") | ||
| ))] | ||
| #[cfg(any(feature = "openssl", feature = "rustls", feature = "rustls-ring"))] | ||
| pub use client::*; | ||
| pub use config::{Config, ConfigBuilder, Socks5Config}; | ||
| pub use types::*; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it could be addressed in a follow-up, but I think we should take advantage of a matrix strategy here, instead of having each combination written down.