瀏覽代碼

Better detection of onion address

Bob Mottram 7 年之前
父節點
當前提交
99cf8b4419
共有 1 個檔案被更改,包括 2 行新增3 行删除
  1. 2
    3
      src/freedombone-controlpanel

+ 2
- 3
src/freedombone-controlpanel 查看文件

@@ -358,9 +358,8 @@ function show_domains {
358 358
         return
359 359
     fi
360 360
     # There are two forms of addresses: "x / y.onion" and "x.onion"
361
-    intermediate=$(echo "$selected_addresses" | awk -F '.' '{print $2}')
362
-    if [[ "$intermediate" == *'//'* ]]; then
363
-        onion_addr=$(echo "$intermediate" | awk -F ' ' '{print $3}').onion
361
+    if [[ "$selected_addresses" == *'/'* ]]; then
362
+        onion_addr=$(echo "$selected_addresses" | awk -F '/' '{print $2}' | awk -F ' ' '{print $2}').onion
364 363
     else
365 364
         onion_addr="$selected_addresses".onion
366 365
     fi