samedi 28 août 2010

The perfect Eclipse, PDT and Xdebug setup ... on Windows

A few days ago I wrote about making a wrapper for Firefox in order to solve Eclipse and PDT bugs when they open an external browser. The script was very simple, written in Bash shell, but not portable on Windows unless you have Cygwin installed. Here's a small C program to achieve the same result on this OS :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/* Written by Alexis Bezverkhyy <alexis@grapsus.net> in august 2010
 * This is free and unencumbered software released into the public domain.
 * For more information, please refer to <http://unlicense.org/> */
 
#include <stdio.h>
#include <string.h>
#include <windows.h>
 
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
        int r,i;
        PROCESS_INFORMATION p;
        STARTUPINFO si = { sizeof(si) };
        char url[1000], ffpath[1000], cmdline[1000], *str;
        FILE *fpid, *fpath;
#define PIDFILE "firefox.pid"
#define PATHFILE "firefox.path"
        
        str = strstr(lpCmdLine, "http");
        
        if(!str)
        {
                printf("no URL given\r\n");
                return 1;
        }
 
        for(i=0; str[i] && str[i] != '\'' && str[i] != '('; i++)
        {
                url[i] = str[i];
        }
        url[i] = 0;
        
        if(!strstr(url, "XDEBUG_SESSION_STOP_NO_EXEC"))
        {
                ffpath[0] = 0;
                if(fpath = fopen("firefox.path", "r"))
                {
                        fscanf(fpath, "%s", ffpath);
                        fclose(fpath);
                }
                if(ffpath[0] == 0)
                {
                        sprintf(ffpath, "%s\\Mozilla Firefox", getenv("ProgramFiles"));
                }
                
                sprintf(cmdline, "\"%s\\firefox.exe\" -no-remote -P eclipse %s", ffpath, url);
                r = CreateProcess(
                        NULL,
                        cmdline,
                        NULL,
                        NULL,
                        0,
                        DETACHED_PROCESS | CREATE_BREAKAWAY_FROM_JOB | CREATE_NEW_PROCESS_GROUP,
                        NULL,
                        ffpath,
                        &si,
                        &p);
 
                fpid = fopen(PIDFILE, "w+");
                if(fprintf(fpid, "%d", p.dwProcessId))
                {
                        printf("Pidfile written!\r\n");
                }
                else
                {
                        printf("Cannot write pidfile\r\n");
                        return 1;
                }
                fclose(fpid);
 
                if(r)
                {
                        printf("Firefox launched! PID=%d cmdline=%s\r\n", p.dwProcessId, cmdline);
                }
                else
                {
                        printf("Cannot start Firefox r=%d cmdline=%s\r\n", r, cmdline);
                        return 1;
                }
        }
        else
        {
                DWORD pid;
                fpid = fopen(PIDFILE, "r");
                if(!fpid)
                {
                        printf("Cannot open pid file\r\n");
                        return 1;
                }
                if(fscanf(fpid, "%d", &pid))
                {
                        HANDLE h;
                        if(h = OpenProcess(PROCESS_ALL_ACCESS, 0, pid))
                        {
                                if(TerminateProcess(h,0))
                                {
                                        printf("Firefox process %d terminated!\r\n", pid);
                                }
                                else
                                {
                                        printf("Cannot terminate Firefox process %d\r\n", pid);
                                        return 1;
                                }
                        }
                }
                else
                {
                        printf("Invalid pidfile!\r\n");
                        return 1;
                }
                fclose(fpid);
                if(DeleteFile(PIDFILE))
                {
                        printf("Pidfile removed!\r\n");
                }
        }
 
        return 0;
}

Firefox is supposed to be installed in its default location, unless you create a file named firefox.path in your Eclipse folder with the path to your Firefox installation.

Ffwrap can be built with mingw or Visual C++. Here's the exe file for lazy people.

jeudi 26 août 2010

Allow the insertion of tabulations in a textarea

When you press tab in a textarea of a web page, it looses focus and no actual tabulation is inserted. You can bypass this behavior with some Javascript. It is very useful for typing code for instance.

Let's say your textarea is identified with an id :

1
2
3
<form>
<textarea id="textarea"></textarea>
</form>

I took the following script from Wikini, hence it is licensed under GNU GPL. The original script had a very annoying bug : when you typed a tab, it was inserted, but the textarea scrolled the text to its top. I corrected it by storing the scroll position before the insertion and by restoring it after.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Original code taken from Wikini <http://www.wikini.net/>, licensed under GNU GPL */
 
document.getElementById("textarea").onkeydown=textareaKeyDown;
 
function textareaKeyDown(e) {
  if (e == null) e = event;
    if (e.keyCode == 9) {
 
      var scrollTop = this.scrollTop;
      var scrollLeft = this.scrollLeft;
 
      if (typeof(document["selection"]) != "undefined") { // ie
        e.returnValue = false;
        document.selection.createRange().text = String.fromCharCode(9);
      } else if (typeof(this["setSelectionRange"]) != "undefined") {  // other
        var start = this.selectionStart;
        this.value = this.value.substring(0, start) + String.fromCharCode(9)
         + this.value.substring(this.selectionEnd);
        this.setSelectionRange(start + 1, start + 1);
      }
 
      this.scrollTop = scrollTop;
      this.scrollLeft = scrollLeft;
 
      return false;
    }
    return true;
  }
}

mercredi 25 août 2010

The perfect Eclipse, PDT (PHP developpement tools) and Xdebug setup !

Eclipse is a great IDE and Xdebug adds a lot of usefull features for PHP debugging. With PDT plugin for Eclipse, you can use Eclipse as a debug client for Xdebug and debug live PHP code !

I won't describe here how to setup each of these tools. You may find many better written articles about that (with lots of screenshots and all other fancy stuff). I will simply expose how to solve a few very annoying bugs in this configuration which can drive you crazy.

No output when debugging in browser

When you choose to debug a PHP script in an external browser, the output of your script isn't sent to the browser until the debug session is terminated ! I verified it with Wireshark, the browser gets absolutely nothing (not even the HTTP headers) and keeps waiting. None of the *ob_* or *flush* functions seem to help it. I kept trying different PHP options and even editing Xdebug source code until I found the implicit_flush setting which makes it work !!! Just add

implicit_flush = On

to your php.ini and you'll be able to see your output in live !

I really think it's a bug because when you normally run a PHP script without output buffering, the headers and the content are sent to the client before the end of execution. Maybe Xdebug messes up some internal PHP configuration when it sets up a debugging session.

Very annoying and useless DEBUG SESSION ENDED new page

As you terminate a browser debug session, a new browser window pops up saying DEBUG SESSION ENDED. WTF ?! Why do we need to make a HTTP query to stop the debug session ?! The DBGP protocol used by PDT has a stop command. One more time with Wireshark I saw that this command is issued by PDT and Xdebug answers ok to it !

The only solution I found was to make a wrapper for Firefox to ignore these queries. It works very well. Even better, I found a way to close the Firefox window with your application when you terminate the debug session !

Eclipse opens web browsers with additionnal parameters you cannot disable !

Here comes another Eclipse bug, when you set up an external browser some implicit parameters are passed to it and there is no way to disable it. For example, it doesn't execute

firefox %URL%

but

firefox -remote openURL(%URL%)

WFT ?! I don't want it to grab my existing Firefox instance and mess around with it ! So here's the wrapper to solve the two problems above. Create a new Firefox profile named eclipse by running

firefox -profile-manager -no-remote

Now set up Eclipse to use the following script as web browser. Debug sessions will be opened in a new window and when you terminate it, this window will automatically close !

1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
 
URL=$(grep -o 'http://[^)]*' <<< "$@")
echo "$URL" >> /tmp/url
if !(grep -q 'XDEBUG_SESSION_STOP_NO_EXEC' <<< "$URL") ; then
        firefox -no-remote -P eclipse "$URL" &
        echo "$!" > /tmp/eclipse-firefox.pid
else
        kill $(cat /tmp/eclipse-firefox.pid)
        rm -f /tmp/eclipse-firefox.pid
fi

Notes

I made my tests on PHP 5.3, Xdebug 2.1, Xdebug 2.2-dev, Eclipse Ganymede, Eclipse Galileo, Eclipse Helios and PDT 2.1 and PDT 2.2 on Debian SID (amd64).

Let me know if these workarounds did it for you or if you found more elegant solutions to those problems.

Edit : here's a port of this wrapper on Windows.

jeudi 5 août 2010

Nagios plugin to check backup folders

Here's a plugin I wrote for Nagios to check directories where some scripts regularly store backup files. You may specify a directory to scan, an optional pattern for the filename and the minimal age and size you expect for the latest file found in that directory and matching the pattern. The script can output warnings and critical alerts with different thresholds.

/root/bin//nagios-check-backup.sh :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
 
# Written by Alexis Bezverkhyy <alexis@grapsus.net> in july 2010
# This is free and unencumbered software released into the public domain.
# For more information, please refer to <http://unlicense.org/>
 
 
function PRINT_USAGE(){
  echo "This Nagios plugin checks backup folders :
  -d DIRECTORY  the directory to search for backup files
  -p PATTERN  an optionnal pattern for backup files
  -t HOURS  maximal age in hours for the latest backup before a warning is issued
  -T HOURS  maximal age in hours for the latest backup before a critical alert is issued
  -s KBYTES maximal size in kilo bytes for the latest backup before a warning is issued
  -S KBYTES maximal size in kilo bytes for the latest backup before a critical alert is issued
  -h    prints out this help
You must at least specify a directory and a minimal size or a minimal age."
  exit 0
}
 
WTIME=0;CTIME=0;WSIZE=0;CSIZE=0;DIR='';PATTERN=''
declare -i CTIME 
declare -i WTIME
declare -i CSIZE
declare -i WSIZE
while true ; do
  getopts 't:T:s:S:d:p:h' OPT 
  if [ "$OPT" = '?' ] ; then break; fi; 
  case "$OPT" in
    "t") WTIME="$OPTARG";;
    "T") CTIME="$OPTARG";;
    "s") WSIZE="$OPTARG";;
    "S") CSIZE="$OPTARG";;
    "d") DIR="$OPTARG";;
    "p") PATTERN="$OPTARG";;
    "h") PRINT_USAGE;;
  esac
done
 
if [ -z "$DIR" -o '(' "$WTIME" = '0' -a "$CTIME" = '0'\
 -a "$WSIZE" = '0' -a "$CSIZE" = '0' ')' ] ; then
  PRINT_USAGE
fi
 
LASTFILE=$(ls -lt --time-style=+%s "$DIR" | grep -v "^total " | grep "$PATTERN"\
 | head -n 1 | sed 's/\s\+/ /g')
if [ -z "$LASTFILE" ] ; then
  echo "CRITICAL - no backup found in $DIR" 
  exit 2
fi
 
TIMESTAMP=$(cut -d ' ' -f 6 <<< "$LASTFILE")
BYTES=$(cut -d ' ' -f 5 <<< "$LASTFILE")
let "SIZE = $BYTES / 1024"
FILENAME=$(cut -d ' ' -f 7 <<< "$LASTFILE")
let "AGE = ( $(date +%s) - $TIMESTAMP ) / 3600"
 
if [ "$CTIME" -gt 0 -a "$AGE" -gt "$CTIME" ] ; then
  echo "CRITICAL - $FILENAME is out of date ($AGE hours old)" 
  exit 2
fi
 
if [ "$WTIME" -gt 0 -a "$AGE" -gt "$WTIME" ] ; then
  echo "WARNING - $FILENAME is out of date ($AGE hours old)"  
  exit 1
fi
 
if [ "$CSIZE" -gt 0 -a "$SIZE" -lt "$CSIZE" ] ; then
  echo "CRITICAL - $FILENAME is too small ($SIZE kb)" 
  exit 2
fi
 
if [ "$WSIZE" -gt 0 -a "$SIZE" -lt "$WSIZE" ] ; then
  echo "WARNING - $FILENAME is too small ($SIZE kb)"  
  exit 1
fi
 
echo "OK - $FILENAME ($AGE hours old, $SIZE kb)"
exit 0

Here is a sample configuration for Nagios to use my script. check_backup checks a regular folder with compressed backups and check_sync checks a directory that is ought to be synchronized, therefore only age is checked and not the size.

commands.cfg :

1
2
3
4
5
6
7
8
9
10
define command {
  command_name check_backup
  command_line /root/bin/nagios-check-backup.sh -d $ARG1$ -p $ARG2$ -t $ARG3$ \
   -T $ARG4$ -s $ARG5$ -S $ARG6$
}
 
define command {
  command_name check_sync
  command_line /root/bin/nagios-check-backup.sh -d $ARG1$ -t $ARG3$ -T $ARG4$
}

foo.cfg :

1
2
3
4
5
6
7
8
9
10
11
12
13
define service{
        use                             generic-service
        host_name                       bar
        service_description             BAK-FOO-CONF
        check_command                   check_backup!/media/backup/foo/conf/!conf!30!60!2000!1000
}
 
define service{
        use                             generic-service
        host_name                       bar
        service_description             BAK-FOO-WWW
        check_command                   check_sync!/media/backup/foo/www/!30!60
}

mercredi 4 août 2010

Connexion automatique à FreeWifi avec Debian

Voici la configuration pour les systèmes du type Debian pour se connecter au réseau des hot-spots FreeWifi :

/etc/network/interfaces :

1
2
3
4
5
6
7
iface freewifi inet dhcp
  wireless-essid FreeWifi
  wireless-rate 11M
  wireless-key off
  pre-up ifconfig ath0 mtu 1460 up
  post-up nohup /root/bin/freewifi.sh &
  post-down killall -q -KILL freewifi.sh

/root/bin/freewifi.sh :

1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
KEY='' # identifiant freewifi, aller sur wifi.free.fr si vous ne l'avez pas encore
PASSWORD='' # mot de passe freewifi
 
sleep 3
while true ; do
  wget --quiet --no-check-certificate --post-data\
  'login='"$KEY"'&password='"$PASWWORD"'&submit=Valider'\
  'https://wifi.free.fr/Auth' -O '/tmp/free'
  sleep 1000
done

Pour lancer la connexion avec une carte Atheros par exemple :

ifup ath0=freewifi

Qu'est-ce qu'il y a d'original là-dedans ? La connexion n'est pas fiable avec la valeur par défaut du paramètre MTU (Maximum Transmission Unit); les paquets de plus de 1,46 ko ne semblent pas passer à cause de la fragmentation (on peut facilement tester avec ping -s TAILLE -v serveur.foo); à 1460 octets la connexion est stable, et des sessions SSH ont duré plusieurs heures sans problème chez moi. Ensuite on fixe la vitesse de la carte wifi à 11 Mbit/s; la plupart des cartes ont une puissance d'émission supérieure aux vitesses plus basses, et de toute manière on n'aura jamais plus de quelques Mbits avec un hot-spot. Enfin, le réseau FreeWifi utilise un portail captif pour vous authentifier pour une durée assez courte (quelque chose comme 30 minutes); avec mon script post-up, l'authentification se fait de manière automatique et périodique.

vendredi 30 juillet 2010

Google API v3 fit map zoom and bounds to all markers

Here is a code snippet to make Google maps API v3 to fit the view to all your markers. There is a lot of similar functions on the Internet, but they're all for the old API v2 which is sensibly different.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//set up the map
function initMap()
{
  var myOptions = {
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  map = new google.maps.Map(document.getElementById("mapCanvas"), myOptions);
}
 
//set up your markers
function initMarkers()
{
  //...
}
 
var map;
var bound = new google.maps.LatLngBounds();
var markers = new Array();
 
//jQuery style entry point, change if necessary
$(document).ready(function(){
  initMap();
  initMarkers();
 
  for(var i in markers)
  {
    bound.extend(markers[i].getPosition());
  }
  map.fitBounds(bound);
});

vendredi 16 juillet 2010

Easy VNC control on Linux and Xorg with x11vnc

Here is my first post in English. I hope that my blog can gain a larger audience in that way : I will try to have an English version for every article unless it is about something specifically French. Please excuse my language errors as I am not a native English speaker.

There seems to be a confusion on the term VNC server between Linux and other OSes.

When you run a VNC server on Windows it means that you run software that shares your desktop over the network, in that case the remote computer, the viewer, is called client. On Linux all the VNC server software doesn't share your desktop, it starts a new X session and shares it over network, it's an empty desktop no one can see before connecting to it with a viewer. It may sound obvious, but can be disturbing when you first try to use VNC on Linux.

It is possible to share your X desktop, in a Windows way with x11vnc : install it with your distribution and run it with

x11vnc -display :0

x11vnc will print something like

The VNC desktop is:      escher:0
PORT=5900

Now you can simply connect to your desktop with vncviewer on port 5900.

It is even possible to connect the viewer automatically (very useful for bypassing firewalls) with :

x11vnc -display :0 -connect host:port

where host has a listening viewer on port, for example ultraVNC supports this feature.

Notice that it is important to deactivate any 3D software on your desktop as x11vnc obviously cannot transport OpenGL graphics.

It even has a graphical interface, brilliant !

x11vnc -gui

Also notice that it would be very easy to make an automatic remote control script for assisting people on Linux. On your side, open a port in your firewall and run vncviewer in listen mode. On the client side, send him a shell script that checks if x11vnc is installed and runs x11vnc -display :0 -connect you:your-port.

jeudi 15 juillet 2010

Blackberry (OS v5) + abonnement SFR + PC sous Linux

Il est possible d'utiliser un terminal mobile RIM pour connecter son PC sous Linux à Internet à travers le réseau GRPS/EDGE/3G. Ce billet est surtout motivé par le fait que les configurations que l'on trouve sur la toile ne semblent plus fonctionner depuis la mise à jour du Blackberry OS à la version 5. Je vais aussi vous donner quelques astuces pour vous en sortir avec la connexion complètement bridée que l'on obtient alors chez SFR.

Configuration du terminal

Allez dans paramètres, puis dans les options avancées et enfin dans TCP/IP : il faut alors tout cocher (utiliser APN et authentification APN) et remplir websfr partout.

Configuration du PC

J'ai suis parti des fichiers de configuration pris sur ProgWeb - Utiliser son BlackBerry sous Linux, une page très complète et en français, à lire absolument si vous avez un BlackBerry.

Il faut installer les paquets barry-util et ppp. Barry est une collection d'utilitaires pour Blackberry, il comprend notamment pppob qui permet d'utiliser le terminal mobile en tant que modem, il y a des configurations PPP toutes prêtes pour les opérateurs amércains, pour SFR il faudra créer les fichiers soi-même. Pour les distributions non semblables à Debian, tout va se passer pratiquement de la même manière pourvu qu'on sache installer Barry et pppd.

/etc/ppp/peers/barry-sfr

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
noipdefault
defaultroute
 
ipcp-restart 7
ipcp-accept-local
ipcp-accept-remote
 
lcp-echo-interval 0
lcp-echo-failure 99
 
nopcomp
noaccomp
noauth
nomagic
noccp
crtscts
pap-timeout 20
pap-restart 20
lcp-restart 10
#novj
user "websfr"
password "websfr"
usepeerdns
 
#decommenter les lignes suivantes pour debugger
#debug
#connect "/usr/sbin/chat -v -f /etc/chatscripts/sfr-chat"
connect "/usr/sbin/chat -f /etc/chatscripts/sfr-chat"
#pty "/usr/sbin/pppob -v -l /tmp/barry.log"
pty "/usr/sbin/pppob"

/etc/chatscripts/sfr-chat

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
ABORT "NO DIALTONE"
ABORT VOICE
ABORT RINGING
 
SAY 'Starting GPRS connect script\n'
 
'' 'BBT_OS'
'' 'ATZ'
OK 'AT+CGDCONT=1,"IP","websfr"'
ABORT 'NO CARRIER'
SAY 'Dialing...'
OK 'ATD*99#'
CONNECT
~p

Connectez alors le terminal en USB et lancez la connexion avec

pon barry-sfr

Vérifiez alors qu'une interface ppp0 s'est créé et que la route par défaut utilise cette interface :

root@escher:/home/grapsus# ifconfig ppp0
ppp0      Link encap:Protocole Point-à-Point  
          inet adr:X.X.X.X  P-t-P:X.X.X.X  Masque:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:3 
          RX bytes:174 (174.0 B)  TX bytes:222 (222.0 B)
root@escher:/home/grapsus# route -n
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0

Vous êtes maintenant connecté.

Notes

Connexion automatique

On peut ajouter cette connexion au fichier /etc/network/interfaces de Debian et automatiser ainsi la connexion :

iface ppp0 inet ppp
	provider barry-sfr
	post-down killall -q -KILL '/usr/sbin/pppob'
	post-up resolvconf -d ath0
	post-up resolvconf -d eth1
	post-up cat /etc/ppp/resolv.conf | resolvconf -a ppp0

et lancer la connexion avec

ifup ppp0

J'ai ajouté des directives qui paramètrent correctement les DNS (eth1 et ath0 sont à remplacer les les noms de vos cartes réseau habituelles), et qui terminent le processus pppob à la fin, ce qui permet de se reconnecter sans avoir à re-brancher son téléphone.

DNS

Les DNS de SFR atterrissent dans le fichier /etc/ppp/resolv.conf, il faut soit le copier vers /etc/resolv.conf à chaque fois, soit utiliser le système ifup avec une directive post-up, comme je l'ai fait ci-dessus.

Lenteur

C'est lent : en GPRS on arrive à peine à 100 kbit/s avec des temps de latence importants.

Connexion bridée

Beaucoup de sites web affichent des pages blanches, de nombreux ports sont bloqués, cette connexion est au final assez pénible à utiliser en l'état. Une solution simple est de paramétrer un serveur SSH sur le port 443 chez vous et de faire passer tout le trafic par là.

Configuration du serveur

Dans /etc/ssh/sshd_config ajouter :

Port 443

Configuration du client

Une fois la connexion SFR établie, on lance

ssh -C -p 443 -D 3333 serveur-maison.bar

SSH lance alors un serveur proxy SOCKS v5 local qui fait transiter les connexions par le tunnel SSH; pour l'utiliser avec Firefox, il faut paramétrer l'adresse du proxy à localhost, port 3333 dans les paramètres réseau.

De manière générale, on peut faire passer n'importe quelle application par le proxy SOCKS avec la bibliothèque tsocks. Il faut paramétrer l'adresse du proxy dans /etc/tsocks.conf :

server = 127.0.0.1
server_type = 5
server_port = 3333

Puis lancer

tsocks application

Tout ça paraît très laborieux, mais une fois qu'on a un peu manipulé ces outils, on arrive, en quelques secondes, à se connecter chez soi de manière sécurisée et profiter au maximum de l'Internet mobile. En cas de doute il suffit de consulter les pages de man pppd, ssh et tsocks.

Édit du 25/07/2010

Suite à des changements chez SFR ma configuration ne fonctionnait plus; j'ai passé pas mal de temps à jouer avec les paramètres PPP et le chat-script pour tout faire remarcher. L'article a été mis à jour en conséquence.

- page 1 de 3