Skip to content

Receive via HTTP with ngrok using a QT Wallet

Tom edited this page May 16, 2020 · 2 revisions

Receive via HTTP with ngrok using a QT Wallet

To receive payment via HTTP, you need to configure your HTTP(S) payment address. For it, you have 3 options listed below : HTTP(S) address with Ngrok (recommended for beginners), HTTP(S) address with NAT or HTTP(S) address with Double-NAT. That will allow every user to receive MWCs by HTTP(S) payment address. The most recommended and easiest way to configure the HTTP(S) address for new user is the Ngrok software. Moreover, by using Ngrok you will not reveal your ip to the sender, so the Double-Nat isn't needed anymore as long as you use the ngrok HTTP(S) address.

Contents :

Requirements

To follow this tutorial, you will need the following:

Install and Run Ngrok

First let's lay out the overall procedure, more detailed instructions with screenshots are below:

  1. Start NGrok
  2. Enable the HTTP Listener
  3. Request the Payment
  4. Dont close the wallet until the payment was received
  • Download Ngrok with no account on all plateforms with the link below :

    In our example, we'll take Ngrok on windows.

      https://ngrok.com/download
    

    ngrokdls




  • Extract the zip file, and double-click on ngrok.exe.

    extractlauchngrok



  • Then click on run to launch Ngrok.

    warnlaunchngrok



  • Ngrok have been welly launched as we can see below.

    clingrok



  • Type ngrok http 3415 in the ngrok console to expose your local web server and so receive MWC via HTTP(S) payment with your Ngrok address.

    • On Windows 7-10 :

      ngrok http 3415  
      
    • On Mac OSX & Linux :

      ./ngrok http 3415  
      

    ngrok



  • Now, you are online and as we can see: the link expire in 7 hours and 59 minutes. The arrow points your HTTPS address which is needed to withdraw (typical ngrok address for your withdrawal : https://xxxxxx.ngrok.io), HTTP & HTTP(S) ngrok address are usable to receive MWC. By the way, we highly recommend every user to use the HTTPS link.

    In the example below, Ngrok HTTP(S) payment address are :
    Ngrok HTTP address : http://f7e57b8c.ngrok.io
    Ngrok HTTPS address : https://f7e57b8c.ngrok.io

    You have a demonstation with image on how to receive MWC with HTTP(S) ngrok address just here !

startlisten




Receive via HTTP with ngrok on GUI MWC Wallet

Your Ngrok link expires after being online 8 hours in a row. You will need to close and launch back the Ngrok sotware to have a new session and as well a new usable link. By the way, make sure to type ngrok http 3415 in the Ngrok terminal to enable the HTTP(S) port 3415 tunnel. Moreover, you need to let the Ngrok Terminal open to be online when you receive your MWC withdrawal. To close Ngrok, you just need to close the Terminal manually or type CTRL + C . Make sure that QT Wallet recipient wallet is listening and the Ngrok HTTP(S) tunnel port is online and running !



  • By default, the HTTP listener is disabled, as you can see below.

httpdisable




  • To enable the HTTP listener click the gear Icon at the Top right of your Wallet, then click on listeners to get into the "listener" Page.

settings




  • Then click on Configure to set-up the HTTP listener as we can see below.

configure




  • A tab named FOREIGN API LISTENER will open, in there tick the checkbox Activate Foreign REST API listener, to enable the HTTP listener.

  • Make sure to edit the Listening Address to 127.0.0.1:3415, then you can click on Apply.

Note that if you use the ip:port address instead of ngrok address, you will need to set this to 0.0.0.0:3415

enable




  • A warning pop-up, click on Continue then the wallet will restart.

warning




  • As we can see below, the HTTP listener is now Online.

withdrawal




  • Now you can run ngrok to expose your local web server and type in newly opened ngrok terminal :

    • On Windows 7-10 :

      ngrok http 3415  
      
    • On Mac OSX & Linux :

      ./ngrok http 3415  
      

runngrok




  • Once you have the http listener on the MWC wallet and ngrok running, you can make your withdrawal with the ngrok address that you can find on the ngrok terminal as we can see below.

    Make sure to have the MWC wallet and ngrok open and running. Note that a typical ngrok address for withdrawal is : https://xxxxxx.ngrok.io

request




  • Once the payement is sent, you will have a pop-up confirming that you received a payement, but at this step the transaction still UNCONFIRMED and it's in AWAITING CONFIRMATION as you can see below :

popupreceived




  • To check the current status of the transaction go in the Transaction tab. As we saw before the transaction still have no confirmation yet, you will need at least to wait 2 min to see it as confirmed.

unconfirmed




  • Once the transaction is confirmed you need to wait for enough confirmations (set to 10 blocks by default) to spend the fund received recently.

confirmed




  • Once 10 confirmations (10 minutes) are reached, you can spend it directly after.

+10confirmation

Clone this wiki locally