Skip to main content

Stavíme tunely v OpenSSH - Root.cz

Stavíme tunely v OpenSSH - Root.cz

Toto je opravdu zajimave. Zejemna tathle ta citace.

Dynamické tunelování

... Dovolíme si tedy problematiku přeskočit a podívat se rovnou na dynamické tunelování:

$ ssh -D1080 user@server
Tímto jednoduchým příkazem jsme z SSH klienta vyrobili SOCKS proxy server. Všechny požadavky o spojení, které SOCKS server obdrží, protuneluje SSH protokolem a vyřídí na straně SSH serveru. Stačí tedy v aplikaci, jako je webový prohlížeč nebo poštovní klient, nastavit použití SOCKS proxy serveru (verze 5 nebo 4) s adresou localhost:1080. Od té chvíle bude veškerý provoz směrován tunelem. Jak snadné.

Comments

Unknown said…
Je to skvělá věc:

1) Je možné surfovat s IP adresou serveru (z jiné země např.)

2) Je možné přes SOCKS používat i DNS.

3) Zajistí bezpečné surfování ve veřejných wifi.

4) Je možné zapnout kompresi u SSH při low-bandwith připojení.

Popular posts from this blog

Google Testing Blog: TotT: EXPECT vs. ASSERT

Google commented on different types of assertations in their testing framework ( Google Testing Blog: EXPECT vs. ASSERT)   I have found assertations in my code very useful on many occasions; however, I do not see any need for the EXPECT function. If your code is broken then it is broken and there is no point in continuing and testing conditions which are not likely to be met.  It is like with C++ compiler errors. The most important error is the firtst error. The rest of the erorrs is usually rubish and useless. 

Viterbi Algorithm in C++ and using STL

To practice my C++ and STL skills, I implemented the Viterbi algorithm example from the Wikipedia page:  http://en.wikipedia.org/wiki/Viterbi_algorithm . The original algorithm was implemented in Python. I reimplemented the example in C++ and I used STL (mainly  vector  and  map  classes).  This code is in public-domain. So, use it as you want.  The complete solution for MS Visual C++ 2008 can be found at  http://filip.jurcicek.googlepages.com/ViterbiSTL.rar // ViterbiSTL.cpp : is an C++ and STL implementatiton of the Wikipedia example // Wikipedia: http://en.wikipedia.org/wiki/Viterbi_algorithm#A_concrete_example // It as accurate implementation as it was possible #include "stdafx.h" #include "string" #include "vector" #include "map" #include "iostream" using namespace std; //states = ('Rainy', 'Sunny') //  //observations = ('walk', 'shop', 'clean') //  //start_probability = {'Rainy': 0.6

how the make HCL and G graphs, and on the fly compositon of HCL and G for KALDI

Well, I had again to do something ;-) The task is to generate/create/update a decoding graph for KALDI on the fly. In my case, I aim at changing a G (grammar) in the context of a dialogue system. One can generate a new HCLG but this would take a lot of time as this involves FST determinization, epsilon-removal, minimization, etc. Therefore, I tried to use on-the-fly composition of statically prepared HCL and G. At first, I struggled with it but later I made it work. See  https://github.com/jpuigcerver/kaldi-decoders/issues/1 Here is a short summary: At the end, I managed to get LabelLookAheadMatcher to work. It is mostly based on the code and examples in opendcd, e.g. https://github.com/opendcd/opendcd/blob/master/script/makegraphotf.sh . First, Here is how I build and prepare the HCL and G. Please not that OpenFST must be compiled with  --enable-lookahead-fsts , see http://www.openfst.org/twiki/bin/view/FST/ReadMe . #--------------- fstdeterminize ${lang}/L_disambig.fst