I want to run my own remote node for my application.
Can I run a node that would be accessible via the wss and http protocol at the same time?
Something like this?
geth --rpc --rpcaddr "MY IP" --ws --wsaddr "MY IP" console
Yes you can do this. But it will not be wss (ws over TLS), it will be a plain web socket. You need a reverse proxy to secure the connection.
Related
I've been trying to find a good free server for our school project so I've decided to try ec2 and just make my pc the server that I will use. I've managed to install my node server onto the ec2. I can post requests using postman but when I'm trying to fetch data from my html file to the ec2 instance, it says:
Fetch API cannot load ec2xxxxxx.amazonaws.com:3000/login. URL scheme "ecxxxxxxx.compute-1.amazonaws.com" is not supported.
Is there any workaround for this? Thanks in advance!!!
Follow these steps:
Make sure your application is listening on port 3000: netstat -anp |
grep 3000 also telnet 127.0.0.1 3000
Then make sure that local firewall is configured to allow incoming access to port 3000 OR disable local firewall to do a quick test (service iptables stop). for linux, its usually iptables
Allow incoming access to port 3000 in your AWS security group.
The error is literally telling you what the problem is:
"URL scheme... is not supported"
Do you know what the "scheme" portion of a url is? This link should help, but it's the something:// portion of a uri/url.
So it indicates that you need to specify a scheme that will get you to your aws server, which is likely either http:// or https://
So to be clear your fetch needs fetch('http://ec2xxxxxx.amazonaws.com:3000/login').
I've geth node running on my local and I need to find out http url and ethereum url to deploy dapp on Mix IDE. Can any one please help and tell where to find these two parameters ?
If you are in default mode probably one of those ports:
8545 TCP, used by the HTTP based JSON RPC API
8546 TCP, used by the WebSocket based JSON RPC API
Are you connecting through JSON RPC API?
$ geth attach ipc:/some/custom/path
$ geth attach http://191.168.1.1:8545
$ geth attach ws://191.168.1.1:8546
Note that by default the geth node doesn't start the http and weboscket service and not all functionality is provided over these interfaces due to security reasons. These defaults can be overridden when the --rpcapi and --wsapi arguments when the geth node is started.
I am trying to configure nginx as a tcp proxy for ejabberd.
The nginx configuration for tcp proxying is as shown below
stream{
upstream ejabberd-servers{
server ejabberd:5222;
}
server{
listen 5222;
proxy_pass ejabberd-servers;
}
}
The ejabberd server is the ejabberd server node name. Since this is done in a docker environment.
When I connect to nginx using smack client library, I get the error is SOCKS5 socket fail.
When I try connection using SOCKS4, I get Servers response VN 60
The reason I am trying to do so is because I do not want to expose ejabberd directly to the Internet. I need to have a proxy to load balance connections and also prevent DDos attacks.
Setting up ejabberd for Internet is nicely explained here.
[how to open ejabberd server to public
Has anybody done so successfully?
I got my Dropwizard application running in an Openshift DIY Cartridge.
The application uses Https and binds to port 8080. I can access the application with curl from within an ssh connection via rhc ssh appname.
What do I have do configure that I can access my Dropwizard application via the appname-username.rhcloud.com domain?
I always get a proxy error 502. Error reading from remote server.
Any suggestion is greatly appreciated.
tmy
In OpenShift your application is deployed behind a proxy server ant this proxy server can only communicate with your application using http.
The OpenShift proxy server allows you to use both http and https connections and to communicate which type of connection was used the proxy server adds x-forwarded headers in the request to your application.
Tho configure Dropwizard, you will need to configure the http connector on port 8080, the default, and set useForwardedHeaders to true, also the default. See http://dropwizard.io/manual/configuration.html#http for more information.
At this point Dropwizard is aware whether a http or https connection was used. The thing I did not find is how to make content "confidential" so that the jetty container inside Dropwizard redirect the client to the https connector served by the OpenShift proxy server when the client tries to connect to your application using http.
I was asking myself if Selenium has any possibilities to secure the communication in Selenium Grid for example. As far as I know Selenium communicates via JSON and Selenese commands. But it is not encrypted. Are there any possibilities to encrypt the communication?
Thanks a lot.
Quick hack: make an ssh tunnel.
Forward remote server's port 4444 as a local port using following ssh command:
ssh user#remotesrv -L 4444:127.0.0.1:4444
Now when you connect to your local port 4444, it actually connects to your server's port 4444 on a secure link. Refer to this link for tutorial.
Afterwards, just open the remote web driver as you normally do.
This will now be on a secure link.
You would have to run your own SSL proxy in front of the hub and the nodes. It is presumed that you aren't publicly exposing your grid.