Giter Site home page Giter Site logo

Comments (6)

x25 avatar x25 commented on July 23, 2024

The proxy uses an event-driven networking framework. Yes, the proxy can handle multiple clients in parallel.

from coinhive-stratum-mining-proxy.

shtse8 avatar shtse8 commented on July 23, 2024

I have tried this proxy, but it seems I cannot connect to my proxy via websocket. any ideas?
which one I should use? ws:// or wss://? Any difference?

from coinhive-stratum-mining-proxy.

x25 avatar x25 commented on July 23, 2024

Use ws:// and please share the code you use.

from coinhive-stratum-mining-proxy.

shtse8 avatar shtse8 commented on July 23, 2024
root@pool-1:~/coinhive-stratum-mining-proxy# python coinhive-stratum-mining-proxy.py  xdn-xmr.pool.minergate.com 45790
2017-09-29 17:35:26+0000 [-] Log opened.
2017-09-29 17:35:26+0000 [-] Site starting on 8892
2017-09-29 17:35:26+0000 [-] Starting factory <twisted.web.server.Site instance at 0x7fd2c36d3680>
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
CoinHive.CONFIG.WEBSOCKET_SHARDS = [["ws://poolhost:8892/proxy"]];
	var miner = new CoinHive.User('username', '',  {
		threads: 4,
		autoThreads: true,
		throttle: 0,
		forceASMJS: false
	});
	miner.start();
</script>
Mixed Content: The page at 'xxxxxxxxxxx' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://poolhost:8892/proxy'. This request has been blocked; this endpoint must be available over WSS.

from coinhive-stratum-mining-proxy.

x25 avatar x25 commented on July 23, 2024

You are trying to connect to an insecure WebSocket endpoint from https page.
There is two solutions:

  1. Implement TLS: secure WebSocket support in proxy
    https://github.com/crossbario/autobahn-python/tree/master/examples/twisted/websocket/echo_tls
  2. Use your http server to forward https/secure websocket requests to the local proxy port
    https://stackoverflow.com/questions/12102110/nginx-to-reverse-proxy-websockets-and-enable-ssl-wss

from coinhive-stratum-mining-proxy.

shtse8 avatar shtse8 commented on July 23, 2024

I am done now. It's working now. But there is no hashrate from the pool. But I can see the proxy is working.

from coinhive-stratum-mining-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.