Code Monkey home page Code Monkey logo

proxy's Introduction

ErgoPool Proxy

This project is a proxy server for ergopool.io

Setup

Prerequisite

ErgoNode

To use the proxy, node v3.2.7 or above is needed.

OpenJDK 11

Here, binaries for OpenJDK 11 exists that depend on your OS, you can install one.

sbt 1.2.8

Depend on your OS, you can follow instructions in this page to install sbt

Appkit library (develop - 60478389921a2aabe4d79f223f54a6bd12a09e4c)

Appkit require GraalVM (Community or Enterprise edition) to be downloaded and installed. Community edition should be enough for Ergo Appkit library.

Install GraalVM Community Edition on MacOS

First you need to download an archive with the latest release of GraalVM (e.g. graalvm-ce-java8-linux-amd64-19.3.1.tar.gz) for Linux and put the programs from it onto the $PATH.

cd <your/directory/with/downloaded/graal>
tar -zxf graalvm-ce-java8-linux-amd64-19.3.1.tar.gz
export GRAAL_HOME=<your/directory/with/downloaded/graal>/graalvm-ce-java8-19.3.1
export PATH=$PATH:${GRAAL_HOME}/bin

For mac, you can view Appkit README Now it's time to build Appkit:

git clone https://github.com/aslesarenko/ergo-appkit.git -b develop
cd ergo-appkit
git checkout 60478389921a2aabe4d79f223f54a6bd12a09e4c
JAVA_HOME=$GRAAL_HOME sbt publishLocal

Installation

Now you have to clone and build this project:

git clone http://github.com/ergopool-io/proxy.git
cd ergo-proxy
sbt assembly

Now you should set your config. An example is available in /config/application.conf. Copy that into a new file and set proper settings for all keys.
After creating the config file, you can run your proxy:

  • For Windows:
java -D"config.file"=path\to\config -jar ergo-proxy-assembly-<PROXY_VERSION>.jar
  • For Unix:
java -Dconfig.file=path/to/config -jar ergo-proxy-assembly-<PROXY_VERSION>.jar

NOTE: After the startup, you should save the mnemonic with your desired password in proxy’s dashboard or swagger panel (/proxy/mnemonic/save). After that, every time you run the proxy, you need to load the mnemonic with the previously used password in the swagger panel.

Otherwise, your collateral address will change every time you start the proxy and proxy will have to move your ergs to the new collateral address which will result in a few minutes delay and some other problems.

So, we strongly recommend you to save the mnemonic!

Docker Quick Start

To use dockerized proxy, create your desired config file and an empty folder to be used by container and run the proxy:

$ mkdir /empty/folder/path
$ chown -R 9052:9052 /empty/folder/path
$ docker run -p 9000:9000 \
  --restart=always \
  -v /desired/path/configFile.conf:/home/ergo/proxy.conf \
  -v /empty/folder/path/:/home/ergo/proxy/ \
  -d ergopoolio/proxy:latest

You can use 9000 port to load the proxy's panel.

proxy's People

Contributors

amirho3ein13 avatar saber-t avatar vorujack avatar zargarzadehm avatar

Stargazers

 avatar

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.