Skip to content

Commit

Permalink
correct library paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ab77 committed Dec 3, 2023
1 parent f85a0b3 commit 22229ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
6 changes: 3 additions & 3 deletions unzoner/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ WORKDIR /data

RUN useradd openssl && (passwd -d openssl || true)

ENV LD_LIBRARY_PATH="/usr/local/lib64:$LD_LIBRARY_PATH"
ENV LD_LIBRARY_PATH="/usr/local/ssl/lib64:$LD_LIBRARY_PATH"

RUN if [ "$BUILD_OPENSSL" = '1' ]; then \
set -x; git clone --depth 1 --branch openssl-$BUILD_OPENSSL_VERSION https://github.com/openssl/openssl \
Expand All @@ -64,7 +64,7 @@ USER root
RUN (deluser --remove-home openssl && delgroup openssl) || true

RUN if [ "$BUILD_OPENSSL" = '1' ]; then \
set -x; cd openssl && id && make install_sw && ldconfig /usr/local/lib64/ \
set -x; cd openssl && id && make install_sw && ldconfig /usr/local/ssl/lib64 \
&& /usr/local/ssl/bin/openssl version && ldd /usr/local/ssl/bin/openssl; fi

# https://stackoverflow.com/a/39006247/1559300
Expand Down Expand Up @@ -179,7 +179,7 @@ ENV VIRTUAL_ENV /root/venv3

ENV PATH "$VIRTUAL_ENV/bin:$PATH"

ENV LD_LIBRARY_PATH="/usr/local/lib64:$LD_LIBRARY_PATH"
ENV LD_LIBRARY_PATH="/usr/local/ssl/lib64:$LD_LIBRARY_PATH"

ENV DEBIAN_FRONTEND noninteractive

Expand Down
25 changes: 9 additions & 16 deletions unzoner/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ def main():
if not started[idx] and not starting[idx]:
if i == 1: # once per loop (start)
starting[idx] = True
log('{}: cycle={} starting={} proto={}'.format(
this,
log('vpn-server-state: cycle={} starting={} proto={}'.format(
i,
starting[idx],
proto
Expand Down Expand Up @@ -177,7 +176,7 @@ def main():
))

if i == 1 or i % LOOP_CYCLE == 0: # twice per loop (start and end)
if DEBUG: log('event-loop-status: cycle={} proto={} status={}'.format(
if DEBUG: log('vpn-server-state: cycle={} proto={} status={}'.format(
i,
proto,
get_status(proto=proto)
Expand All @@ -195,7 +194,7 @@ def main():
shell_check_output_cmd('ip link | grep {}'.format(TUN_IFACE))
geo_result = get_geo_location()
assert geo_result, '{}: double-vpn not ready'.format(this)
print('double-vpn: {}'.format(geo_result))
print('double-vpn-geo: {}'.format(geo_result))
log_server_stats(status=started) # server up only if double-vpn is up
except:
print('exception-handler in {}: {}'.format(this, repr(e)))
Expand Down Expand Up @@ -232,8 +231,7 @@ def main():
if DEVICE_TYPE in [2, 3, 5]:
# iperf timeout
if c_stp and now - c_stimer > (LOOP_TIMER * LOOP_CYCLE * 5):
log('{}: pid={} elapsed={}'.format(
this,
log('iperf-status: pid={} elapsed={}'.format(
c_stp.pid,
now - c_stimer
))
Expand All @@ -258,8 +256,7 @@ def main():

# hdparm or dd timeout
if c_iotp and now - c_iotimer > (LOOP_TIMER * LOOP_CYCLE * 3):
log('{}: pid={} elapsed={} test={}'.format(
this,
log('iotest-status: pid={} elapsed={} test={}'.format(
c_iotp.pid,
now - c_iotimer,
c_iott
Expand All @@ -272,10 +269,7 @@ def main():
}
log('run_iotest: result={}'.format(result))
res = update_iotest(data=result)
log('update_iotest({}): {}'.format(
res[0],
res[1]
))
log('update_iotest({}): {}'.format(res[0], res[1]))
except Exception as e:
print('exception-handler in {}: {}'.format(this, repr(e)))
if DEBUG: print_exc()
Expand Down Expand Up @@ -394,7 +388,7 @@ def main():
m3 = p2.search(c_msg).groups()
c_remote = m3[0]
c_country = m3[1]
log('{}: remote={} country={}'.format(
log('vpn-client-state: remote={} country={}'.format(
this,
c_remote,
c_country
Expand All @@ -405,8 +399,7 @@ def main():
if not connected and not connecting:
if i == 1:
connecting = True
log('{}: cycle={} connecting={} family={}'.format(
this,
log('vpn-client-state: cycle={} connecting={} family={}'.format(
i,
connecting,
AF
Expand Down Expand Up @@ -466,7 +459,7 @@ def main():
shell_check_output_cmd('ip link | grep {}'.format(TUN_IFACE))
geo_result = get_geo_location()
assert geo_result, '{}: client tunnel down'.format(this)
print('client-vpn: {}'.format(geo_result))
print('client-vpn-geo: {}'.format(geo_result))
except AssertionError as e:
print('exception-handler in {}: {}'.format(this, repr(e)))
if DEBUG: print_exc()
Expand Down

0 comments on commit 22229ec

Please sign in to comment.