Added QR Code of Onion address at the end of startup when Tor activated (#166)

* Added QR Code of Onion address at the end of startup when Tor activated

* Indentation fix
This commit is contained in:
kexkey
2020-02-23 22:14:33 +00:00
committed by GitHub
parent fb78a18d90
commit 97ae1a8fd9
4 changed files with 30 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
FROM golang:1.13-alpine3.10 as builder
FROM golang:1.13-alpine3.10 as builder-torgen
RUN apk add git build-base
@@ -13,12 +13,32 @@ RUN go get
RUN go build torgen.go
RUN chmod +x /go/src/torgen/torgen
FROM alpine:3.11.0 as builder-qrencode
RUN apk add --update --no-cache \
autoconf \
automake \
build-base \
libtool \
git \
pkgconfig
RUN git clone https://github.com/fukuchi/libqrencode.git \
&& cd libqrencode \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install
FROM node:12.2.0-alpine
ENV EDITOR=/usr/bin/nano
COPY . /app
COPY --from=builder /go/src/torgen/torgen /app/torgen
COPY --from=builder-torgen /go/src/torgen/torgen /app/torgen
COPY --from=builder-qrencode /usr/local/bin/qrencode /usr/local/bin/
COPY --from=builder-qrencode /usr/local/lib/libqrencode.so.4.1.0 /usr/local/lib/libqrencode.so.4
WORKDIR /app
RUN mkdir /data && \

View File

@@ -93,6 +93,7 @@ module.exports = class App {
bitcoin_version: process.env.BITCOIN_VERSION,
lightning_version: process.env.LIGHTNING_VERSION,
notifier_version: process.env.NOTIFIER_VERSION,
conf_version: process.env.CONF_VERSION,
setup_version: process.env.SETUP_VERSION,
noWizard: !!options.noWizard,
noSplashScreen: !!options.noSplashScreen,

View File

@@ -80,7 +80,12 @@ printf "\r\n\033[0;92mDepending on your current location and DNS settings, point
printf "\r\n"
printf "\033[0;95m<% cns.forEach(cn => { %><%= ('https://' + cn + ':' + traefik_https_port + '/welcome\\r\\n') %><% }) %>\033[0m\r\n"
<% if ( features.indexOf('tor') !== -1 && torifyables && torifyables.indexOf('tor_traefik') !== -1 ) { %>
printf "\033[0;92mYou can also use Tor Browser and navigate to your onion address:\r\n"
printf "\033[0;92mYou can also use Tor Browser and navigate to your onion address:\r\n\r\n"
printf "\033[0;95mhttps://${TOR_TRAEFIK_HOSTNAME}:<%= traefik_https_port %>/welcome\033[0m\r\n\r\n"
printf "\033[0;92mTor Browser on mobile? We got you:\r\n\r\n\033[0m"
docker run --rm -it cyphernode/cyphernodeconf:<%= conf_version %> $USER qrencode -t UTF8 "https://${TOR_TRAEFIK_HOSTNAME}:443/welcome"
printf "\r\n"
<% } %>
printf "\033[0;92mUse 'admin' as the username with the configuration password you selected at the beginning of the configuration process.\r\n\r\n\033[0m"

1
dist/setup.sh vendored
View File

@@ -195,6 +195,7 @@ configure() {
-e PYCOIN_VERSION=$PYCOIN_VERSION \
-e BITCOIN_VERSION=$BITCOIN_VERSION \
-e LIGHTNING_VERSION=$LIGHTNING_VERSION \
-e CONF_VERSION=$CONF_VERSION \
-e SETUP_VERSION=$SETUP_VERSION \
--log-driver=none$pw_env \
--network none \