SlideShare uma empresa Scribd logo
1 de 1
// OnUdpStart
// This script is executed when a, UDP port is opened.
// $listeningPort is the port you specified in "ports" list
// $redirectPort is assigned at runtime when the udp server is started. First
port start at 9501 and is incremented for each server
// $isForward : true if is just port forwarding. False if it's reverse tethering
// $isSocks5 : if reverse tethering, indicate if socks5 must be used.
// all theses variables are read only
//$LogI --------- Script : Udp port start : $listeningPort / $redirectPort
if $isForward then
return
fi
if $isAtRunTime then
return
fi
// reverse tethering
// send specific tcp port (53,...) to TETHER chain
if $isSocks5 = false then
// send udp connection directly to the tunnel (42010+)
$iptables -t nat -A TETHER -o $myInterface -p udp --dport $listeningPort -j
REDIRECT --to $redirectPort
else
// Socks5 mode : redirection is done on redsocks client port : 42001
// redsocks (42001) will communicate with Socks5Server (port 42003) that
return the UdpRelay (42004)
$iptables -t nat -A TETHER -o $myInterface -p udp --dport $listeningPort -j
REDIRECT --to 42001
fi

Mais conteúdo relacionado

Mais procurados

Cloud Erlang
Cloud ErlangCloud Erlang
Cloud ErlangNgoc Dao
 
Licão 12 decision loops - statement iteration
Licão 12 decision loops - statement iterationLicão 12 decision loops - statement iteration
Licão 12 decision loops - statement iterationAcácio Oliveira
 
What's new in Perl 5.10?
What's new in Perl 5.10?What's new in Perl 5.10?
What's new in Perl 5.10?acme
 
C++ hello world
C++ hello worldC++ hello world
C++ hello worldAL- AMIN
 
Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Elixir Club
 

Mais procurados (7)

Cloud Erlang
Cloud ErlangCloud Erlang
Cloud Erlang
 
Looping in C
Looping in CLooping in C
Looping in C
 
Licão 12 decision loops - statement iteration
Licão 12 decision loops - statement iterationLicão 12 decision loops - statement iteration
Licão 12 decision loops - statement iteration
 
What's new in Perl 5.10?
What's new in Perl 5.10?What's new in Perl 5.10?
What's new in Perl 5.10?
 
C++ hello world
C++ hello worldC++ hello world
C++ hello world
 
Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet
 
3 rd animation
3 rd animation3 rd animation
3 rd animation
 

Destaque

Les entretiens de la Fabrique : Gaz de schiste, coût du travail, innovation
Les entretiens de la Fabrique : Gaz de schiste, coût du travail, innovationLes entretiens de la Fabrique : Gaz de schiste, coût du travail, innovation
Les entretiens de la Fabrique : Gaz de schiste, coût du travail, innovationLa Fabrique de l'industrie
 
SRI orientation
SRI orientationSRI orientation
SRI orientationSusan Rose
 
MΕΓΑΣ ΑΛΕΞΑΝΔΡΟΣ
MΕΓΑΣ ΑΛΕΞΑΝΔΡΟΣMΕΓΑΣ ΑΛΕΞΑΝΔΡΟΣ
MΕΓΑΣ ΑΛΕΞΑΝΔΡΟΣMyriampzd
 
Resultados encuestas
Resultados encuestasResultados encuestas
Resultados encuestas00201292
 
Summer time into learning early literacy story time-2328
Summer time into learning early literacy story time-2328Summer time into learning early literacy story time-2328
Summer time into learning early literacy story time-2328SuperServiceChallenge2013
 
Livro dificuldades ortograficas 3
Livro dificuldades ortograficas 3Livro dificuldades ortograficas 3
Livro dificuldades ortograficas 3Jakelini Oliveira
 
VIVEKANANDH Resume
VIVEKANANDH ResumeVIVEKANANDH Resume
VIVEKANANDH ResumeVivek Anandh
 
EXCEL Y GEOMETRIA ANALITICA
EXCEL Y GEOMETRIA ANALITICAEXCEL Y GEOMETRIA ANALITICA
EXCEL Y GEOMETRIA ANALITICAJorge La Chira
 
2015年度調査1 2次調査完成版(修正)
2015年度調査1 2次調査完成版(修正)2015年度調査1 2次調査完成版(修正)
2015年度調査1 2次調査完成版(修正)あゆみ 矢野
 
HMW - WIRE WOUND RESISTORS CERAMIC ENCASED TYPE
HMW - WIRE WOUND RESISTORS CERAMIC ENCASED TYPEHMW - WIRE WOUND RESISTORS CERAMIC ENCASED TYPE
HMW - WIRE WOUND RESISTORS CERAMIC ENCASED TYPEhtrindia
 
Sota ishii
Sota ishiiSota ishii
Sota ishiiESO1
 

Destaque (14)

Les entretiens de la Fabrique : Gaz de schiste, coût du travail, innovation
Les entretiens de la Fabrique : Gaz de schiste, coût du travail, innovationLes entretiens de la Fabrique : Gaz de schiste, coût du travail, innovation
Les entretiens de la Fabrique : Gaz de schiste, coût du travail, innovation
 
SRI orientation
SRI orientationSRI orientation
SRI orientation
 
MΕΓΑΣ ΑΛΕΞΑΝΔΡΟΣ
MΕΓΑΣ ΑΛΕΞΑΝΔΡΟΣMΕΓΑΣ ΑΛΕΞΑΝΔΡΟΣ
MΕΓΑΣ ΑΛΕΞΑΝΔΡΟΣ
 
Resultados encuestas
Resultados encuestasResultados encuestas
Resultados encuestas
 
Summer time into learning early literacy story time-2328
Summer time into learning early literacy story time-2328Summer time into learning early literacy story time-2328
Summer time into learning early literacy story time-2328
 
Livro dificuldades ortograficas 3
Livro dificuldades ortograficas 3Livro dificuldades ortograficas 3
Livro dificuldades ortograficas 3
 
VIVEKANANDH Resume
VIVEKANANDH ResumeVIVEKANANDH Resume
VIVEKANANDH Resume
 
Aprendiendo a leer
Aprendiendo a leerAprendiendo a leer
Aprendiendo a leer
 
EXCEL Y GEOMETRIA ANALITICA
EXCEL Y GEOMETRIA ANALITICAEXCEL Y GEOMETRIA ANALITICA
EXCEL Y GEOMETRIA ANALITICA
 
2015年度調査1 2次調査完成版(修正)
2015年度調査1 2次調査完成版(修正)2015年度調査1 2次調査完成版(修正)
2015年度調査1 2次調査完成版(修正)
 
HMW - WIRE WOUND RESISTORS CERAMIC ENCASED TYPE
HMW - WIRE WOUND RESISTORS CERAMIC ENCASED TYPEHMW - WIRE WOUND RESISTORS CERAMIC ENCASED TYPE
HMW - WIRE WOUND RESISTORS CERAMIC ENCASED TYPE
 
3. Letra L.
3. Letra L.3. Letra L.
3. Letra L.
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Sota ishii
Sota ishiiSota ishii
Sota ishii
 

Udp scriptstart

  • 1. // OnUdpStart // This script is executed when a, UDP port is opened. // $listeningPort is the port you specified in "ports" list // $redirectPort is assigned at runtime when the udp server is started. First port start at 9501 and is incremented for each server // $isForward : true if is just port forwarding. False if it's reverse tethering // $isSocks5 : if reverse tethering, indicate if socks5 must be used. // all theses variables are read only //$LogI --------- Script : Udp port start : $listeningPort / $redirectPort if $isForward then return fi if $isAtRunTime then return fi // reverse tethering // send specific tcp port (53,...) to TETHER chain if $isSocks5 = false then // send udp connection directly to the tunnel (42010+) $iptables -t nat -A TETHER -o $myInterface -p udp --dport $listeningPort -j REDIRECT --to $redirectPort else // Socks5 mode : redirection is done on redsocks client port : 42001 // redsocks (42001) will communicate with Socks5Server (port 42003) that return the UdpRelay (42004) $iptables -t nat -A TETHER -o $myInterface -p udp --dport $listeningPort -j REDIRECT --to 42001 fi