Mit 'ultrasurf' verschlagwortete Einträge

How to use Ultrasurf with Firefox

This is a little tutorial that should help you to set up Firefox for using Ultrasurf as Proxy. It should work on Windows as well as on Linux with either Ultrasurf running simply in Wine or as a daemon with ghostship. I will assume that you have already installed Ultrasurf (for detailed instructions on how to do that with wine, look here).

tl;dr: Server: 127.0.0.1, Port: 9666


1. Start Ultrasurf (or ghostship) for the first time. If you use ghostship, read on at step 6 (or if you require that Ultrasurf uses a proxy itself, run ghostship --viewer and follow the next steps).

2. The main interface appears now. Click Option (which should actually be named Options, but that does not matter – the software works anyway ;) ).

9.6-main-gui-option

3. Again, you will get another dialog right in your face. This time, check Do not use IE because we are talking about Firefox and not Internet Explorer and Hide Golden Lock because the image of a golden lock at the bottom right is not useful anymore (it should tell whether Ultrasurf has set the IE to use it or not).

9.6-options-gui-checked

4. Optionally, you can make Ultrasurf itself use a proxy by clicking Proxy Settings. This is only required if you can’t access the Internet without using a proxy in your local network or if you want to chain multiple proxy applications in a row.

5. Close the Options GUI (picture above) by clicking OK and the main window by clicking Exit. Then start Ultrasurf again, just as in step 1.

6. Start up Firefox, navigate to checkip.dyndns.org and write down your current IP somewhere.

7. Now you should think about whether you would like to always use Ultrasurf (easier, continue with step 12) or depending on a white- or blacklist with specific sites (read on) and/or with a icon in Firefox that allows easy switching on the fly.

8. Install the Firefox Add-On FoxyProxy by opening this website and clicking Add to Firefox as well as in the popping up dialog on Install Now.

install-foxyproxy

9. Restart Firefox.

10. After that, you will be greeted with a dialog that asks whether you would like to set up FoxyProxy for usage with TOR. In this tutorial, you don’t need to do this as the onion router is  a completely different proxy application and should therefore click on No, but you might want to do it anyway if you have TOR installed.

11. Foxyproxy is a very powerful application that allows – as mentioned before – the usage of proxys depending on lists just to name one big feature. Keep in mind that Ultrasurf will listen on your loopback IP, which is always 127.0.0.1 (that information might also be called server), on the port 9666. You can now either do a very simple setup that allows you to switch proxys on the fly by following this tutorial, or dive right into the official FoxyProxy documentation and learn how to use the more advanced features. Continue when you have Ultrasurf set up.

12. Open up Firefox’ preferences by clicking Edit/Preferences (Windows users will find it in the Tools menu).

firefox-edit-preferences

13. Navigate to Advanced, Network and set up a pretty high cache, like in the screenshot below (1024 MB). This will make sure that Firefox downloads only new data and keeps the old on the harddrive, thus speeding up the surfing experience and keeping away unnecessary traffic from Ultrasurf.

firefox-preferences-dialog

14. If you use FoxyProxy, click Close and continue with step 16 now. otherwise click Settings.

15. In the new GUI, click Manual proxy configuration, Use this proxy server for all protocols and fill in the following data:

HTTP Proxy: 127.0.0.1

Port: 9666

After that, click OK.

firefox-proxy-settings-for-ultrasurf

16. So you set everything up? You better check that by calling checkip.dyndns.org again and comparing the current displayed IP with the one from step 6. If it is different, everything works :)

ghostship: first release (0.4)

Ghostship runs surprisingly stable (which may also have something to do with the recent upstream update of Ultrasurf from 9.5 to 9.6), so I decided to release an official source package.  It still does run Ultrasurf like an Unix daemon, I have written pretty much about that by now, so if you don’t know the project yet, check out its homepage.

Why do I start with version 0.4? Well, I just counted my first two attempts plus the major rewrite I did lately as single versions.

About packaging: I have already made two PKGBUILDs for the AUR, so Archlinux is all fine. Yoschi on the other hand will build Debian/Ubuntu packages as soon as I get the code ported properly (I am not quite sure, but I think that there are still some parts in the code that work only on Arch). If you would like to see ghostship on another distribution, please try to build a distribution specific package from the release and give some feedback.

PS: I guess I will add a little tutorial how to use Ultrasurf with Firefox on the ghostship homepage soon. The wordpress.com control panel tells me, that there are actually people looking for such information.

ghostship-svn in the Archlinux User Repository

Ghostship itself runs okay now in my experience, but I’ll keep on testing a bit longer, before I make a stable release. Archlinux is bleeding edge, so if you use that distribution, you may just build the most recent SVN revision from the AUR with the PKGBUILD I submitted.

Any feedback is welcome.

ghostship 0.4: some major rewrites

A few days ago I noticed that my ghostship software had much more bugs than I thought – in fact some bugs that prevented even bigger bugs (that happens sometimes…). Today I had enough time, so I read through all the code again, gave it better comments, simplified it where possible and rewrote some parts. The ship does still need a lot of testing and fixing, since some parts (shutdown, viewer and the init scripts) do not work anymore.

As said before, I will release an officiall tarball (gotta love that word) as soon as I think it is stable. But feel free to literary check out the svn and tell me what you think about it if you want to.

ultrasurf-tools becomes ghostship

As mentioned before, I like to run the Windows proxy software Ultrasurf on Linux.

Some time ago, I made a simple script, that keeps the connection alive by sending data through it from time to time. Two weeks ago I decided to advance it and give it a new name, „ultrasurf-tools“. This piece of bash code was able to completely hide the GUI and run it like a Unix daemon then.

A few days ago however, I decided to push the development even further and turn it into a full Unix daemon. That means automatic installation of the two needed DLL files, automatic download and update of Ultrasurf and even automatic setup of an own user with his own wineprefix and TightVNC settings. So basically one just needs to install that daemon and as soon as it gets started, everything works out of the box.

It basically does its job by now, except that there is still a little bug. When your internet disconnects, Ultasurf tries to connect again for an infinite amount of time, but it somehow does not trigger wget’s timeout (which I use to check whether we are online or not). Thus not only Ultrasurf hangs, but the daemon does not realize it and so nothing happens at all. As soon as I fix this, I will put an official release of the script on its brand new homepage.

Also you may have figured out from the title of this article, that I gave the software a new name. Why? Because ultrasurf-tools might be fine for a little bash script, but as a full functionally daemon, I’d rather use a name that is not related to another software’s name. So I came up with ghostship (metaphor for the invisibility of your IP as well as the invisibility of the GUI).

More information on the official homepage.

ultrasurf-tools

Update: Please use the newer and improved version of this script: ghostship.

In one of my earlier articles, I released a little script which keeps Ultrasurf connected by generating traffic every minute. Today I’ve gone one step further and made a script that does the following:

  • Ultrasurf starts invisible in its very own (vnc)X-server, which makes it possible to start it before you even started your X session
  • Generates traffic every 20 seconds and by doing that it checks at the same time whether Ultrasurf is still connected to the internet
  • It writes a status-file which you can use with conky to display whether Ultrasurf is currently working or not
  • When Ultrasurf is down, the script tries a few more times (with less waiting between the tries) and then it restarts the whole vncserver, thus killing everything inside it and starting clean (by doing normal restarts, sometimes Ultrasurf binds the wrong or simply no port)

Ready? Here’s my step by step tutorial:

  • install Ultrasurf (in its own wineprefix)
  • install tightvnc
  • run vncserver && vncserver -kill :1 once to set a password for your vnc server
  • open up ~/.vnc/xstartup and copy paste the following

#!/bin/sh

if [ $VNCDESKTOP = "ultrasurf-tools" ]; then

# you'll need to edit this line, so that it points

# to your Ultrasurf installation

WINEPREFIX=/home/you/.wine-ultrasurf wine c:/u.exe

else

xrdb $HOME/.Xresources

xsetroot -solid grey

xterm -geometry 80x24+10+10 -ls -title \

"$VNCDESKTOP Desktop" &

twm &

fi

  • paste the following to a file called ~/ultrasurf-tools or something and give it the executable flag

#!/bin/bash

# configuration

# warning, statusfile will get removed!

statusfile=~/.ultrasurf

# internal variables

errors=0

# functions

function restart_ultrasurf {

vncserver -kill :96

vncserver :96 -name "ultrasurf-tools" -localhost

errors=0

# echo "sleeping for 20 seconds"

sleep 20

}

# the main loop

# echo "starting ultrasurf..."

rm "$statusfile"

restart_ultrasurf

while [ 1 ];do

# echo "performing connection check..."

dyndns=`http_proxy="127.0.0.1:9666"\

wget --no-cookies checkip.dyndns.org -O - -q -nv`

if [ -z "$dyndns" ]; then

let errors+=1

# echo "error ($errors): couldn't request\

data through ultrasurf."

if [ $errors = 2 ]; then

rm "$statusfile"

fi

if [ $errors = 4 ]; then

# echo "error limit reached! restarting ultrasurf..."

restart_ultrasurf

else

# echo "sleeping for 3 seconds"

sleep 3

fi

else

errors=0

# echo "success. sleeping for 20 seconds..."

touch "$statusfile"

sleep 20

fi

done

  • to use the statusfile with conky, add a line similar to this one to the TEXT area (make sure you use your username):

ultrasurf: ${if_existing /home/you/.ultrasurf}${color}online$else${color red}offline$endif

  • you can now add this to your /etc/rc.local in order to start ultrasurf before you start your X (the result will be that as soon as your X is started, you are ready to go and do not need to wait for Ultrasurf anymore):

su yourusername -c ~/ultrasurf-tools &

  • if you would like to check what is going on, execute vncviewer :96 (but you usually don’t need that)

Southparkstudios auf Deutsch (Update 3!)

UPDATE3: MTV Networks hat sich anscheinend wirklich Mühe gegeben, da man jetzt auch die englischen Episoden anschauen kann:

southpark auf englisch anschauen (southpark.de)

Seit gulli einst über southparkstudios.com, die offizielle Southpark-Seite auf der man alle (!) Episoden kostenlos anschauen kann, geschrieben hat, habe ich mir dort viele Folgen angeschaut. Noch mehr gefreut hatte mich dann das Update, welches 720p-Streaming erlaubte :) Heute habe ich bei yoschi dann gesehen, dass es das Portal nun auch auf Deutsch gibt. An sich nicht schlecht, dachte ich mir, schließlich kenne ich viele, die einfach keine Lust haben sich Filme/Serien auf Englisch anzusehen, wobei ich nicht zu diesen gehöre. Ganz im Gegenteil, ich finde es schön Filme und Serien in der jeweiligen Originalsprache (insofern ich diese verstehe) anzuschauen. Deshalb war ich auch etwas schockiert, als ich während dem schreiben dieses Blogeintrags auf southparkstudios.com folgendes lesen durfte:

southparkstudios.com: Southpark auf Englisch nur in den USA

Southpark auf Deutsch? Ja, aber bitte nur optional.

UPDATE: Ormus.info beschreibt einen alternativen Workaround, bei dem man keinen Proxy benötigt.

Ich will die Folgen weiterhin auf Englisch genießen können. Deshalb will ich an dieser Stelle im Gegensatz zu yoschi und apt-get-update verraten, wie man diese Sperre umgehen kann. Man benötigt einen USA-Proxy wie etwa Ultrasurf (rennt schön mit Wine unter Linux) und das Firefox-Addon FoxyProxy. Als Default Proxy stellt man die Direkte Internetverbindung ein (wenn man FoxyProxy nur für Southparkstudios konfiguriert haben will) und fügt dann einen neuen Proxy hinzu. Ultrasurf lauscht auf Port 9666 von localhost. Wichtig ist jetzt bei dem neu hinzugefügten Proxy folgendes einzugeben (Wildcards):

1. Filter, Blacklist:

http://media.mtvnservices.com/*

2. Filter, Blacklist:

http://*southparkstudios.com/*

3. Filter, Whitelist:

http://*southparkstudios.com/*/

Das ganze funktioniert so, dass die HTML-Seiten (3. Filter) alle über Ultrasurf geleitet werden (dort finden Serverseitig die Abfragen nach IP->Land statt), aber der wirkliche Content (Bilder, Videos, Flash-Kram) vorbeigeleitet wird (-> schön schnell über die eigentliche Leitung). Falls man keine anderen Proxys bei FoxyProxy eingetragen hat, kann man die Blacklist-Filter auch weglassen.

UPDATE2: Laut nerdcore kommen die Englischen Episoden bald auf das deutsche Portal:

[...] wir (MTV Networks) arbeiten mit Hochdruck daran, alle englischen Folgen auch auf Southpark.de verfügbar zu machen – das kann ein paar Wochen dauern, wird jedoch auf jedenfall kommen. Danke für Dein Verständnis! [...]

New Installation (Update!)

Last time I set up arch on my desktop pc (my laptop’s still broken :-\), I installed the i686 version in order to use it with colinux, too. I’ve figured out that colinux did not really work as good as expected – XServer crashed often (both XMing and Cygwin/X) as well as no Pulseaudio Server working with Windows Vista x86 (bad choice anyway) and it was too slow. The only good way to work with it was via Terminal. In the end I didn’t boot Win6 often and used arch all day. But what is Archlinux i686 on a x86_64 processor? Bullshit! So I did the reinstall.

On the Windows side btw, I decided to use Win7. Why? It is just up to date and not as fucked up as Vista. M$ made a step in the right direction here. I downloaded the build 7232 x86_64 somewhere and installed it. Oh and I haven’t booted it since then yet, because I use it just for games that don’t run with Linux (none installed yet) – and I don’t play these too often anyway.

Windows 7

Windows 7

Now to Archlinux. x86_64 here of course, with arch32 chroot. While the last one is making some trouble with wine and Alsa is not working as wanted yet (no mic), the rest of it runs pretty well. For the design I chose a less colorful one, so it is completely different compared to the Joker one (which I don’t really like anymore).

Archlinux Clean

Archlinux Clean

Archlinux stuffed

Archlinux Stuffed

The conky configurations (click!) are inspired by Ghost1227’s Nice and Clean Theme, the wallpapers are from here (Windows) and here (Arch).

Ultrasurf: keep the connection bash script

Ultrasurf is a freeware proxy software that tunnels everything you send through it with SSL and gives you a different IP (from America).  It is used in China for example to visit banned websites.

Well this windows application works fine with wine, although it looses the connection if you aren’t browsing web pages permanently. This script prevents it from doing that.

#!/bin/bash

while [ 1 ]

do

export http_proxy="127.0.0.1:9666"

wget --no-cookies checkip.dyndns.org -O - -nv -q \

> /dev/null

export http_proxy="127.0.0.1:9667"

wget --no-cookies checkip.dyndns.org -O - -nv -q \

> /dev/null

#wait one minute

sleep 60

done

Note: It usually binds the 9666 port, but sometimes it uses the 9667 one instead. Thats why I choose to run wget on both of them.


languages

both  
english    
german    

newest tweets & articles (en)

licenses

Except where otherwise noted:

Creative Commons License
All the text is licensed under a Creative Commons Attribution-Share Alike 3.0 Germany License.



CC-GNU GPL

Code snippets are licensed under the CC-GNU GPL version 2.0 or later.