Bob Mottram 8 年前
父节点
当前提交
b6bf112e77
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 2
    2
      src/freedombone-sec
  2. 3
    3
      src/freedombone-utils-onion

+ 2
- 2
src/freedombone-sec 查看文件

@@ -752,12 +752,12 @@ function store_passwords {
752 752
 }
753 753
 
754 754
 function show_tor_bridges {
755
-    if ! grep "bridge " /etc/tor/torrc; then
755
+    if ! grep "Bridge " /etc/tor/torrc; then
756 756
         echo $'No Tor bridges have been added'
757 757
         return
758 758
     fi
759 759
     clear
760
-    grep "bridge " /etc/tor/torrc
760
+    grep "Bridge " /etc/tor/torrc
761 761
 }
762 762
 
763 763
 function add_tor_bridge {

+ 3
- 3
src/freedombone-utils-onion 查看文件

@@ -435,7 +435,7 @@ function tor_add_bridge {
435 435
         echo 'UseBridges 1' >> /etc/tor/torrc
436 436
     fi
437 437
 
438
-    bridge_str="bridge $bridge_type ${bridge_ip_address}:${bridge_port} ${bridge_key}"
438
+    bridge_str="Bridge $bridge_type ${bridge_ip_address}:${bridge_port} ${bridge_key}"
439 439
     if ! grep "${bridge_str}" /etc/tor/torrc; then
440 440
         sed -i "/UseBridges/a ${bridge_str}" >> /etc/tor/torrc
441 441
     fi
@@ -447,13 +447,13 @@ function tor_remove_bridge {
447 447
     bridge_ip_address="$1"
448 448
     bridge_type='obfs4'
449 449
 
450
-    bridge_str="bridge $bridge_type ${bridge_ip_address}"
450
+    bridge_str="Bridge $bridge_type ${bridge_ip_address}"
451 451
     if grep "${bridge_str}" /etc/tor/torrc; then
452 452
         sed -i "/${bridge_str}/d" /etc/tor/torrc
453 453
     fi
454 454
 
455 455
     # If there are no bridges remaining then remove UseBridges
456
-    if ! grep "bridge " /etc/tor/torrc; then
456
+    if ! grep "Bridge " /etc/tor/torrc; then
457 457
         if ! grep "#UseBridges" /etc/tor/torrc; then
458 458
             sed -i 's|UseBridges|#UseBridges|g' /etc/tor/torrc
459 459
         fi