-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New flags to listen to all interfaces #495
New flags to listen to all interfaces #495
Conversation
c991fe0 to
cfeaccf
Compare
|
opening the RPC to external hosts by default is a little too promiscuous for my liking. i think this will have to be fixed properly. |
|
Yes, I can understand. |
|
So secure by default, only the local interface but open with |
|
Should just be:
|
|
Ok I will take care of that. |
|
Maybe we can try to avoid too many configuration flags for RPC servers for now? Can live with |
|
fair enough - should make it even easier :) |
cfeaccf to
0f8dd16
Compare
0f8dd16 to
b562955
Compare
|
I went with the naming suggested by @tomusdrw but flipped it. That allows having all the rpc related option as |
| long: rpc-external | ||
| help: Listen to all rpc interfaces (Default is local) | ||
| takes_value: false | ||
| - ws-external: |
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.
I believe there is no point in running RPC externally but not WS, would merge the two flags to avoid clutter in CLI help.
In the future we will most likely run HTTP & WS transport on the same port anyway, so maybe it will be a good opportunity to merge the two options as well.
So I guees it's all right :)
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.
I did not want to be too pushy here and let for now the users decide. That allows at the moment a user to 'open up' WS while keeping RPC only local only. It may be better security-wise for now.
substrate/cli/src/lib.rs
Outdated
| }; | ||
|
|
||
| config.network.listen_address = Some(SocketAddr::new("0.0.0.0".parse().unwrap(), port)); | ||
| config.network.listen_address = Some(SocketAddr::new("127.0.0.1".parse().unwrap(), port)); |
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.
Why this was changed? I think network should always listen externally.
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.
Wuuhooo, sorry, this is a big mistake on my hand, good catch and sorry about that. Will fix.
b562955 to
2aabe80
Compare
* master: README: fixed typo in docker run command (#518) Merge *_at methods. (#515) New flags to listen to all interfaces (#495) If contract reaches max depth, return Err (#503) Some networking cleanups (#504) Derivable Encode & Decode (#509) substrate: return Option in all storage related RPC methods (#510) Build with locked Cargo.lock on CI (#514) Place call data into a newly allocated pages (#502)
* examples: Use tokio instead of std async Signed-off-by: Alexandru Vasile <[email protected]> * test-runtime: Use tokio instead of std async Signed-off-by: Alexandru Vasile <[email protected]> * subxt: Use tokio instead of std async Signed-off-by: Alexandru Vasile <[email protected]> * examples: Use only necessary tokio features Signed-off-by: Alexandru Vasile <[email protected]>
The current version listens only on 127.0.0.1.
This change is required for containerised versions to run properly.
Adds:
--ws-external--rpc-external