Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
cfde850
Add files via upload
skykingisepic Mar 29, 2023
83a1b12
Update README.md
skykingisepic Mar 30, 2023
0d83ca7
Merge branch 'fastepic:master' into master
johanneshahn Dec 27, 2023
8db165c
Whitespace/formatting cleanup for app_mongo.js
who-biz Jan 3, 2024
124626e
Whitespace/formatting cleanup for app_mongo_many.js
who-biz Jan 3, 2024
8ecd908
Increase frequency of challenge interval to 60sec
who-biz Jan 4, 2024
b2efa5e
Merge pull request #6 from who-biz/60s-challenge-interval
who-biz Jan 5, 2024
c45a264
Merge branch 'master' into whitespace-formatting-cleanup
who-biz Jan 5, 2024
003f48c
Merge pull request #5 from who-biz/whitespace-formatting-cleanup
who-biz Jan 5, 2024
ee60647
Update error handling, remove ErrorKind in favor of thiserror
who-biz Jan 10, 2024
aa5a827
Update Ring dependency to 0.16.20, resolve compilation errors
who-biz Jan 10, 2024
ab769e5
Resolve compilation warnings
who-biz Jan 10, 2024
cd51576
epicbox version 3.0.0
Jan 12, 2024
92129c7
format strings; move ws.process_slate and ws.pending_challenge into c…
Jan 12, 2024
edc6ad2
add client detail for better handling messages and backward compatibi…
Jan 14, 2024
e6eaa2f
add client detail for better handling messages and backward compatibi…
Jan 14, 2024
aa41cc0
fix passthrough client deleted when send new slate
Jan 14, 2024
8141bd2
fix unsubscribe; fix missing client detail default values; fix Made r…
Jan 15, 2024
5b3eab0
Merge pull request #7 from who-biz/thiserror-ring-deps
who-biz Jan 16, 2024
b59d0f8
Merge branch 'master' into 3.0.0
who-biz Feb 26, 2024
bd9f222
Merge pull request #9 from EpicCash/3.0.0
who-biz Feb 26, 2024
58d0679
update html page content; add missing config value for interval period
Feb 26, 2024
7662628
Merge pull request #10 from EpicCash/3.0.1
who-biz Feb 26, 2024
f647b4f
refactor error handling messages for clarity and consistency
johanneshahn Dec 11, 2025
d33902a
Refactor epicbox application and configuration for Docker deployment
johanneshahn Dec 31, 2025
e139096
Add Nginx passthrough/proxy example to README for secure Epicbox depl…
johanneshahn Dec 31, 2025
6034d7f
Update Docker and Nginx configurations for improved port mapping and …
johanneshahn Dec 31, 2025
afab1a9
Update Nginx port mapping to avoid conflict with default HTTPS port
johanneshahn Dec 31, 2025
7bd36d1
Fix Dockerfile formatting and ensure epicboxlib binary is executable
johanneshahn Dec 31, 2025
ab3d8b2
Ensure all files in epicboxlib are executable in Dockerfile
johanneshahn Dec 31, 2025
df8746c
Add epic-wallet submodule for dependency management
johanneshahn Dec 31, 2025
7675d43
feat: Initialize epicboxlib with core functionality and types
johanneshahn Dec 31, 2025
c389cb9
feat: Ensure git submodules are initialized and updated in Dockerfile
johanneshahn Dec 31, 2025
7439ac3
refactor: Remove git submodule initialization from Dockerfile
johanneshahn Dec 31, 2025
51eeddb
feat: Add Docker Compose build instructions and wait-for-mongo script
johanneshahn Dec 31, 2025
50aff08
fix: Update entrypoint in Docker Compose to ensure wait-for-mongo scr…
johanneshahn Dec 31, 2025
892f837
fix: Update mongo_url in default_config.json for correct authentication
johanneshahn Dec 31, 2025
7c85474
refactor: Remove wait-for-mongo script volume and entrypoint from epi…
johanneshahn Dec 31, 2025
a22c82f
fix: Remove entrypoint for epicbox2 service in Docker Compose
johanneshahn Dec 31, 2025
98ca39e
feat: Add NGINX configuration template and update Docker Compose for …
johanneshahn Dec 31, 2025
34e3792
refactor: Consolidate NGINX configuration into template and remove ol…
johanneshahn Dec 31, 2025
ff55733
refactor: Remove SSL server block from NGINX configuration template
johanneshahn Dec 31, 2025
b0382ee
feat: Update NGINX configuration to support SSL and proxy settings
johanneshahn Dec 31, 2025
dd8e8d7
refactor address validation to ensure port comparison is type-safe
johanneshahn Jan 1, 2026
9bc7bdc
Merge branch 'master' of https://github.com/EpicCash/epicboxnodejs-so…
johanneshahn Jan 1, 2026
d18c4a1
refactor: Use config variables for epicbox domain and port in documen…
johanneshahn Jan 1, 2026
82bb771
refactor: Use environment variables for epicbox domain and port confi…
johanneshahn Jan 1, 2026
cd67fc8
refactor: Enhance configuration loading with environment variable sup…
johanneshahn Jan 1, 2026
fbe1207
refactor: Update README and nginx config for improved domain and port…
johanneshahn Jan 2, 2026
34365ba
refactor: Update epicboxlib version to 0.2.0 and remove deprecated wa…
johanneshahn Jan 2, 2026
7dc2104
Add files via upload
skykingisepic Jan 2, 2026
a0285a3
Delete epicbox/Dockerfile.alt
skykingisepic Jan 2, 2026
b5f1954
Builds epicbox binary with npm pkg, adds user:epicsvcs, reduces Image…
skykingisepic Jan 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 172 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Please take extra care not to add rules that will make tracked files ignored.
# To test that, run `git ls-files -i --exclude-standard`.
# To check why a specific file is ignored, run `git check-ignore -v <filepath>`.

# === Rule for dotfiles ===
# Ignore all dotfiles.
.*
# Exclude specific dotfiles that we want to track.
!deps/**/.*
!.devcontainer/
!.devcontainer/.devcontainer.json
!test/fixtures/**/.*
!.clang-format
!.cpplint
!.editorconfig
!.eslintignore
!.eslintrc.js
!.eslintrc.yaml
!.gitattributes
!.github
!.gitignore
!.gitkeep
!.gitpod.yml
!.mailmap
!.nycrc
!.yamllint.yaml

# === Rules for root dir ===
/core
/vgcore.*
/v8*.log
/perf.data
/perf.data.old
/tags
/tags.*
/doc/api.xml
/node
/node_g
/gon-config.json
/*.exe
/*.swp
/out
/*.msi
/*.wixpdb
/*.qlog
# For GitHub Codespaces
/pythonenv*

# === Rules for artifacts of `./configure` ===
/icu_config.gypi
/config.gypi
/config.status
/config_fips.gypi

# === Rules for MSVS artifacts ===
Debug/
Release/
*.sln
*.suo
*.vcxproj*
UpgradeLog*.XML
_UpgradeReport_Files/
*.sdf
*.opensdf
*.VC.*
*.wixobj
/tools/msvs/genfiles/
/npm.wxs
/corepack.wxs
/tools/msvs/msi/**/Release/
/tools/msvs/msi/**/obj/
/tools/msvs/msi/**/x64/
# Exclude MSVS files used for .msi file generation
!tools/msvs/msi/**/custom_actions.vcxproj
!tools/msvs/msi/**/nodemsi.sln

# === Rules for GYP artifacts ===
*-nodegyp*
/gyp-*-tool
/test/addons/??_*/
/*.mk

# === Rules for other build artifacts ===
/email.md
/deps/v8-*
/deps/icu
/deps/icu*.zip
/deps/icu*.tgz
/deps/icu-tmp
./node_modules
/android-toolchain/
# generated by gyp on Windows
/deps/openssl/openssl.props
/deps/openssl/openssl.targets
/deps/openssl/openssl.xml
/deps/openssl/openssl-fipsmodule.props
/deps/openssl/openssl-fipsmodule.targets
/deps/openssl/openssl-fipsmodule.xml
# generated by gyp on android
/*.target.mk
/*.host.mk
/deps/openssl/openssl.target.mk
/deps/zlib/zlib.target.mk
# generated by MSVC with /P enabled
tools/*/*.i
tools/*/*.i.tmp

# === Rules for release artifacts ===
/*.tar.*
/*.pkg
/SHASUMS*.txt*

# === Rules for `node_modules` ===
!**/node_modules/**
/node_modules
/tools/doc/node_modules
/tools/clang-format/node_modules

# === Rules for test artifacts ===
/*.tap
/*.xml
/v8*-tap.json
/node_trace.*.log
# coverage related
/gcovr
/build
/coverage

# === Rules for Xcode artifacts ===
*.xcodeproj
*.xcworkspace
*.pbxproj

# === Rules for files in `/deps` ===
# Exclude all files in the vendored `npm`.
!/deps/npm/node_modules
# These are not needed and causes issues for distro packagers.
/deps/npm/node_modules/.bin/
# Respect V8's .gitignore
!deps/v8/**
# Ignore the libuv book
/deps/uv/docs/code/
/deps/uv/docs/src/guide/
# Ignore .github directories
/deps/**/.github/
# Ignore dependencies fetched by tools/v8/fetch_deps.py
/deps/.cipd

# === Rules for Windows vcbuild.bat ===
/temp-vcbuild

# === Rules for CMake ===
cmake-build-debug/
CMakeCache.txt
CMakeFiles
CTestTestfile.cmake
cmake_install.cmake
install_manifest.txt
*.cbp

# === Global Rules ===
# Keep last to avoid being excluded
*.pyc
__pycache__
.DS_Store
*~

# === Rules for C++ development ===
compile_commands.json

epicboxlib_source/target
config.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "epicboxlib_source/epic-wallet"]
path = epicboxlib_source/epic-wallet
url = https://github.com/EpicCash/epic-wallet.git
1 change: 0 additions & 1 deletion Doc_2.0.0/ReadMe.md

This file was deleted.

Binary file removed Doc_2.0.0/epicbox_2.0.0_17_march_2023.pdf
Binary file not shown.
Binary file removed Doc_2.0.0/epicbox_email_like_addresses.pdf
Binary file not shown.
111 changes: 101 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,109 @@
## Nginx Passthrough/Proxy Example

To expose your Epicbox Docker service securely on your own domain, use a simple nginx reverse proxy. This allows you to use SSL and a custom domain name.

### 1. Start Epicbox Docker with Custom Domain

```sh
EPICBOX_DOMAIN=your-epicbox-domain.example docker compose up -d --build
```

### 2. Example nginx Reverse Proxy Configuration

Place this in your nginx config (e.g., `/etc/nginx/sites-available/epicbox.conf`):

```
upstream epicbox_backend {
ip_hash;
server 127.0.0.1:8888 max_fails=3 fail_timeout=10s;
server 127.0.0.1:8889 max_fails=3 fail_timeout=10s;
}
server {
server_name your-epicbox-domain.example www.your-epicbox-domain.example;

root /var/www/html/epicbox/;
index index.html index.htm;

location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_pass http://epicbox_backend;
proxy_read_timeout 90;

# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

access_log /var/log/nginx/epicbox.access.log;
error_log /var/log/nginx/epicbox.error.log;

listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/your-epicbox-domain.example/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-epicbox-domain.example/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
```

- Replace `your-epicbox-domain.example` with your actual domain.
- Adjust SSL certificate paths as needed.

### 3. Reload nginx

```sh
sudo nginx -s reload
```

Now, your domain will securely proxy to your Epicbox Docker service!
# epicboxnodejs
Epicbox version on nodejs with elements of rust and adopt changes in epicbox protocole.

Added app_mongo_many.js for run many isntances under one domain. Each instance need use the same mongo database, in all instances adopted fastsend method.
For fastsend method only one of instances must have in config_many.json set fast_send_master=true, slaves ips must be set in array fast_send_slaves.
All instances must have the same epicbox domain and epicbox port set ( correct to your used epicbox.domain ).
Epicbox Relay Server for Epic Cash, built with Node.js and Rust.

## Docker Quick Start

1. **Clone the repository and initialize submodules:**
```sh
git clone <repo-url>
cd epicboxnodejs-source
git submodule update --init --recursive
```

2. **Build and start all services with Docker Compose:**
```sh
docker compose up -d --build
```

3. **Custom configuration via environment variables:**
You can override key settings at runtime:
```sh
EPICBOX_DOMAIN=my.domain.com docker compose up -d --build
```
- `EPICBOX_DOMAIN`: Sets the domain for epicbox services (default: epicbox.your-domain.com)
- `EPICBOX_PORT`: Sets the port for epicbox services (default: 443)
- `NGINX_PORT`: Sets the external port for nginx (default: 8443)

4. **Access the service:**
- Open `http://localhost:8443` (or your chosen NGINX_PORT) in your browser.

Instance with set fast_send_master = true can work like independent alone epicbox ( like preverious version app_mongo.js ).
5. **Scaling and failover:**
- Two epicbox instances are started by default (epicbox1 and epicbox2).
- nginx will automatically route requests to available instances.

For each instance so you must use diffirent config_many.json file ( set other local port, or fast_send_master = false etc. ) so to run epicbox use command:
## Configuration Reference

node app_mongo_many.js config_many.json
All major settings can be configured via environment variables or a `.env` file:

And for next one:
```
EPICBOX_DOMAIN=my.domain.com
EPICBOX_PORT=443
```

node app_mongo_many.js config_many_slave1.json
## Advanced

Enjoy.
- MongoDB, nginx, and epicbox instances are all managed via `docker-compose.yml`.
- For custom setups, edit `docker-compose.yml` and `default_config.json` as needed.
Loading