Skip to content

u-transnet/utransnet-faucet

 
 

Repository files navigation

English Russian

utransnet-faucet

Python-based faucet for Transnet

Installation

  • edit config.py and provide private keys and settings
  • python manage.py install

Usage

  • python manage.py runserver

The faucet is then available at URL http://localhost:5000

Nginx configuration

Run uwsgi --ini wsgi.ini

and use a configuration similar tothis

user transnet;
worker_processes  4;

events {
    worker_connections  2048;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    access_log  /www/logs/access.log;
    error_log  /www/logs/error.log;
    log_not_found off;
    sendfile        on;
    keepalive_timeout  65;
    gzip  on;

    upstream websockets {
      server localhost:9090;
      server localhost:9091;
    }

    server {
        listen       80;
        if ($scheme != "https") {
                return 301 https://$host$request_uri;
        }

        listen       443 ssl;
        server_name  transnet-wallet.com;
        ssl_certificate      /etc/nginx/ssl/your-cert.crt;
        ssl_certificate_key /etc/nginx/ssl/your-cert.key;
        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  5m;
        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;

        location ~ /ws/? {
            access_log on;
            proxy_pass http://websockets;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_next_upstream     error timeout invalid_header http_500;
            proxy_connect_timeout   2;
        }
        location ~ ^/[\w\d\.-]+\.(js|css|dat|png|json)$ {
            root /www/wallet;
            try_files $uri /wallet$uri =404;
        }
        location / {
            root /www/wallet;
        }
        location /api {
                include uwsgi_params;
                uwsgi_pass unix:/tmp/faucet.sock;
        }

    }
}

Related projects

Contributing

We'd love to have your helping hand on our project! See CONTRIBUTING.md for more information on what we're looking for and how to get started.

License

Project is under the MIT license. See LICENSE for more information.

About

Python-based Transnet faucet

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.3%
  • Shell 1.2%
  • HTML 0.5%