Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion nodeapp/coordinators/bazaar/locations.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ location /mainnet/bazaar/relay/ {
add_header Access-Control-Allow-Origin *;
}

# BitcoinVeneto Coordinator Testnet Locations
# LibreBazaar Coordinator Testnet Locations
location /test/bazaar/static/assets/avatars/ {
proxy_pass http://testnet_bazaar/static/assets/avatars/;
}
Expand Down
70 changes: 70 additions & 0 deletions nodeapp/coordinators/freedomsats/locations.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Freedomsats Mainnet Locations
location /mainnet/freedomsats/static/assets/avatars/ {
proxy_pass http://mainnet_freedomsats/static/assets/avatars/;
}

location /mainnet/freedomsats/api/ {
# if ($request_method = 'OPTIONS') {
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
# add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
# add_header 'Access-Control-Max-Age' 1728000;
# add_header 'Content-Type' 'text/plain; charset=utf-8';
# add_header 'Content-Length' 0;
# return 204;
# }
# if ($request_method = 'POST') {
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
# add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
# add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
# }
# if ($request_method = 'GET') {
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
# add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
# add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
# }
proxy_pass http://mainnet_freedomsats/api/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}

location /mainnet/freedomsats/ws/ {
proxy_pass http://mainnet_freedomsats/ws/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}

location /mainnet/freedomsats/relay/ {
proxy_pass http://mainnet_freedomsats/relay/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Origin $http_origin;
proxy_set_header Host $host;

add_header Access-Control-Allow-Origin *;
}

# Freedomsats Coordinator Testnet Locations
location /test/freedomsats/static/assets/avatars/ {
proxy_pass http://testnet_freedomsats/static/assets/avatars/;
}

location /testnet/freedomsats/api/ {
proxy_pass http://testnet_freedomsats/api/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}

location /testnet/freedomsats/ws/ {
proxy_pass http://testnet_freedomsats/ws/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
9 changes: 9 additions & 0 deletions nodeapp/coordinators/freedomsats/upstreams.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Libre freedomsats Coordinator Mainnet
upstream mainnet_freedomsats {
server localhost:108;
}

# Libre freedomsats Coordinator Testnet
upstream testnet_freedomsats {
server localhost:1008;
}
4 changes: 4 additions & 0 deletions nodeapp/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ http {
include /etc/nginx/conf.d/moon/upstreams.conf;
# Libre Bazaar
include /etc/nginx/conf.d/bazaar/upstreams.conf;
# FreedomSats
include /etc/nginx/conf.d/freedomsats/upstreams.conf;

server {

Expand Down Expand Up @@ -80,6 +82,8 @@ http {
include /etc/nginx/conf.d/moon/locations.conf;
# Libre Bazaar
include /etc/nginx/conf.d/bazaar/locations.conf;
# FreedomSats
include /etc/nginx/conf.d/freedomsats/locations.conf;

# do not log healtchecks made against "/selfhosted"
location /selfhosted {
Expand Down
15 changes: 14 additions & 1 deletion nodeapp/robosats-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,18 @@ mainnet_bazaar_socat="socat tcp4-LISTEN:${mainnet_bazaar_port},reuseaddr,fork,ke
testnet_bazaar_socat="socat tcp4-LISTEN:${testnet_bazaar_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${testnet_bazaar_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"


################################
# Freedomsats
# Mainnet
mainnet_freedomsats_onion=dqmmejfmtlve7d4ccohk4usriifdtci6xk4wv7igxn2fyaduh25s6did.onion
mainnet_freedomsats_port=108
# Testnet
testnet_freedomsats_onion=dqmmejfmtlve7d4ccohk4usriifdtci6xk4wv7igxn2fyaduh25s6did.onion
testnet_freedomsats_port=1008
# socat cmd
mainnet_freedomsats_socat="socat tcp4-LISTEN:${mainnet_freedomsats_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${mainnet_freedomsats_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"
testnet_freedomsats_socat="socat tcp4-LISTEN:${testnet_freedomsats_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${testnet_freedomsats_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"


# RUN!
$mainnet_temple_socat & $testnet_temple_socat & $mainnet_lake_socat & $testnet_lake_socat & $mainnet_veneto_socat & $testnet_veneto_socat & $mainnet_moon_socat & $testnet_moon_socat & $mainnet_bazaar_socat & $testnet_bazaar_socat & nginx
$mainnet_temple_socat & $testnet_temple_socat & $mainnet_lake_socat & $testnet_lake_socat & $mainnet_veneto_socat & $testnet_veneto_socat & $mainnet_moon_socat & $testnet_moon_socat & $mainnet_bazaar_socat & $testnet_bazaar_socat & $mainnet_freedomsats_socat & $testnet_freedomsats_socat & nginx