Ainda na onda de RouterBoard aqui vai um vídeo de como configurar um servidor de DHCP na sua RB:
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
# SUA REDE LOCAL
acl localnet src 192.168.1.0/24
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
#SUAS REGRAS DE COISAS A BLOQUEAR OU LIBERAR DEVEM VIR AQUI.
acl bloqueio dstdom_regex "/etc/squid/bloqueio"
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
#A PARTIR DESTE PONTO SERÃO INSERIDAS AS REGRAS DE LIBERAÇÃO/BLOQUEIO QUE IREMOS UTILIZAR
http_access deny bloqueio
http_access allow localnet
http_access deny all
icp_access allow localnet
icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
hosts_file /etc/hosts
coredump_dir /var/spool/squid
// Conhecendo o jogador
var user = prompt("Qual seu nome?");
// Começando o jogo
var question = prompt("Você está em seu caminho para Cair Paravel e encontra um troll impedindo sua passagem. O que você faz? Corre, luta, paga ou é alguém importante?").toLowerCase();
// Opções de ação
switch(question) {
case 'corre':
var rapido = prompt("Você é rápido?").toLowerCase();
var vantagem = prompt("Você está em vantagem?").toLowerCase();
if(rapido === 'sim' || vantagem === 'sim') {
console.log("Você conseguiu fugir! Quanta sorte!!!!");
}
else {
console.log("Está louco?? Claro que você virou almoço de ogro!!");
}
break;
case 'luta':
var coragem = prompt("Você é corajoso?").toLowerCase();
var forte = prompt("Você é forte?").toLowerCase();
if(coragem === 'sim' && forte === 'sim') {
console.log("Você conseguiu fugir! Quanta sorte!!!!");
}
else {
console.log("Um dos dois não vai adiantar de nada! É um ogro!! Divirta-se sendouma refeição");
}
break;
case 'paga':
var dinheiro = prompt("Você tem dinheiro?").toLowerCase();
var riqueza = prompt("Você tem algo que poderia dar no lugar do dinheiro?").toLowerCase();
if(dinheiro === 'sim' || riqueza === 'sim') {
console.log("Essa foi por pouco!! Sorte esse ogro ser capitalista!");
}
else {
console.log("Você prefere ser servido de que jeito?");
}
break;
case 'alguém importante':
var pedro = prompt("Você é o Grande Rei Pedro?").toLowerCase();
var suzana = prompt("Você é a Grande Rainha Suzana?").toLowerCase();
var lucia = prompt("Você é a Rainha Lúcia?").toLowerCase();
var edimundo = prompt("Você é o Rei Pedro?").toLowerCase();
if(pedro === 'sim' || suzana === 'sim' || lucia === 'sim' || edimundo === 'sim') {
console.log("O ogro lhe concedeu passagem obviamente majestade.");
}
else {
console.log("Você está comproblemas, grandes problemas.");
}
break;
default:
console.log("Não entendi sua resposta");
break;
}
//Check if the user is ready to play!
confirm("Você está pronto para jogar?");
//Age
var age = prompt("What's your age?");
if (age >= 18)
{
console.log ("Divirta-se");
}
else
{
console.log("Não me responsabilizo por seus atos");
}
//História
var Intro = "Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him.";
console.log(Intro);
//First
console.log("Batman glares at you");
var userAnswer = "Are you feeling lucky, punk?";
prompt(userAnswer);
//Go ahead
if (userAnswer === "Yes")
{
console.log("Batman hits you very hard. It's Batman and you're you! Of course Batman wins!");
}
else
{
console.log("You did not say yes to feeling lucky. Good choice! You are a winner in the game of not getting beaten up by Batman");
}
//Feedback
var feedback = prompt("Feedback");
if (feedback > 8)
{
console.log("This is just the beginning of my game empire. Stay tuned for more!");
}
else
{
console.log("I slaved away at this game and you gave me that score?! The nerve! Just you wait!");
};
var slaying = true;
var youHit = Math.random();
var damageThisRound = Math.floor(Math.random() * 5 + 1);
var totalDamage = 0;
while (slaying) {
if (youHit) {
console.log("You hit!");
totalDamage += damageThisRound;
if (totalDamage >= 4) {
console.log("You win!");
slaying = false;
} else {
youHit = Math.floor(Math.random() * 2);
}
} else {
console.log("You lose!");
slaying = false;
}
}