File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -2,9 +2,11 @@
 | 
			
		||||
    <div class="controls" v-if="display">
 | 
			
		||||
        <i class="off-icon" v-on:click="action('shutdown')" v-if="off_available"></i>
 | 
			
		||||
        <i class="quit-icon" v-on:click="action('quit')" v-if="quit_available"></i>
 | 
			
		||||
        <i class="home-icon" @click="$router.push({ name: 'home' })"></i>
 | 
			
		||||
        <i class="update-icon" v-if="update_available&&update_possible" @click="$router.push({ name: 'update' })"></i>
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import axios from 'axios'
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        created: function() {
 | 
			
		||||
            setTimeout(function () { this.internet_check(); }.bind(this), 1000);
 | 
			
		||||
            setTimeout(function () { this.internet_check(); }.bind(this), 5000);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -290,8 +290,14 @@ class Network(object):
 | 
			
		||||
        try:
 | 
			
		||||
            sp.Popen("echo 1 > /proc/sys/net/ipv4/ip_forward",
 | 
			
		||||
                     shell=True).wait()
 | 
			
		||||
 | 
			
		||||
            # Enable forwarding.
 | 
			
		||||
            sp.Popen(["iptables", "-A", "POSTROUTING", "-t", "nat", "-o",
 | 
			
		||||
                      self.iface_out, "-j", "MASQUERADE"]).wait()
 | 
			
		||||
 | 
			
		||||
            # Prevent the device to reach the 80 of TinyCheck.
 | 
			
		||||
            sp.Popen(["iptables", "-A", "INPUT", "-i", self.iface_in, "-d",
 | 
			
		||||
                      "192.168.100.1", "-p", "tcp", "--dport", "80", "-j" "DROP"]).wait()
 | 
			
		||||
            return True
 | 
			
		||||
        except:
 | 
			
		||||
            return False
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user