瀏覽代碼

mesh onion service only uses vpn port

Bob Mottram 7 年之前
父節點
當前提交
2080b7a8f1
共有 2 個檔案被更改,包括 8 行新增10 行删除
  1. 1
    9
      src/freedombone-mesh-batman
  2. 7
    1
      src/freedombone-mesh-connect

+ 1
- 9
src/freedombone-mesh-batman 查看文件

@@ -424,15 +424,7 @@ function start {
424 424
         HIDDEN_SERVICE_PATH=/var/lib/tor/hidden_service_
425 425
         if [ ! -f ${HIDDEN_SERVICE_PATH}mesh/hostname ]; then
426 426
             echo "HiddenServiceDir ${HIDDEN_SERVICE_PATH}mesh/" >> /etc/tor/torrc
427
-            echo "HiddenServicePort 8008 127.0.0.1:8008" >> /etc/tor/torrc
428
-            echo "HiddenServicePort 8010 127.0.0.1:8010" >> /etc/tor/torrc
429
-            echo "HiddenServicePort ${TOX_PORT} 127.0.0.1:${TOX_PORT}" >> /etc/tor/torrc
430
-            echo "HiddenServicePort ${IPFS_PORT} 127.0.0.1:${IPFS_PORT}" >> /etc/tor/torrc
431
-            echo "HiddenServicePort ${ZERONET_PORT} 127.0.0.1:${ZERONET_PORT}" >> /etc/tor/torrc
432
-            echo "HiddenServicePort 5353 127.0.0.1:5353" >> /etc/tor/torrc
433
-            echo "HiddenServicePort 5354 127.0.0.1:5354" >> /etc/tor/torrc
434
-            echo "HiddenServicePort 548 127.0.0.1:548" >> /etc/tor/torrc
435
-            echo "HiddenServiceAuthorizeClient stealth mesh" >> /etc/tor/torrc
427
+            echo "HiddenServicePort 653 127.0.0.1:653" >> /etc/tor/torrc
436 428
             systemctl restart tor
437 429
         fi
438 430
     else

+ 7
- 1
src/freedombone-mesh-connect 查看文件

@@ -158,9 +158,15 @@ function mesh_setup_vpn {
158 158
 }
159 159
 
160 160
 function connect_to_mesh {
161
+    connect_title=$"Connect to another mesh network"
162
+    HIDDEN_SERVICE_PATH=/var/lib/tor/hidden_service_mesh/hostname
163
+    if [ -f ${HIDDEN_SERVICE_PATH} ]; then
164
+        connect_title=$"Connect from $(cat $HIDDEN_SERVICE_PATH) to another mesh network"
165
+    fi
166
+
161 167
     data=$(tempfile 2>/dev/null)
162 168
     trap "rm -f $data" 0 1 2 5 15
163
-    dialog --title $"Connect to another mesh network" \
169
+    dialog --title "$connect_title" \
164 170
            --backtitle $"Freedombone Mesh" \
165 171
            --inputbox $'Enter the IP address or domain name of the other mesh.' 10 60 2>$data
166 172
     sel=$?