Skip to content

Instantly share code, notes, and snippets.

@weakish
Created April 17, 2012 11:00
Show Gist options
  • Save weakish/2405306 to your computer and use it in GitHub Desktop.
Save weakish/2405306 to your computer and use it in GitHub Desktop.
How I use #twitter: #proxy on #mobile & #backup & #mirroring to #weibo

mobile

twitter has been blocked in China. Thus we need proxies to access it from mobile phones.

We need:

  • android phone
  • twitter client for android (e.g. twitter.com's client)
  • [SSHTunnel][] (also available in Android market)
  • ssh access to remote machine [SSHTunnel]: http://code.google.com/p/sshtunnel/

Setup on vps:

  1. install squid
  2. run squid with default configuration

We use squid proxy instead of socks proxy directly because android phone is poor at dynamic port forwarding.

Setup on phone:

  1. root your phone
  2. install and run SSHTunnel
  3. Host: ssh server domain/ip
  4. Port: ssh port (usually 22)
  5. User: ssh username
  6. Password: ssh password (If you prefer public key authentication, store your key as /sdcard/sshtunnel/key.)
  7. disable 'Use socks proxy'
  8. Local Port: any port >1024 (default 1984)
  9. Remote Address: 127.0.0.1
  10. Remote Port: 3128

Unrooted users need to also setup APN in android settings. More info: http://madeye.me/2011/02/10/ssh-tunnel-on-the-android-application-puff-android-edition/

backup

identi.ca

You can download all your microblogs in atom. (In identi.ca website, settings, backup account.)

twitter

pip install twitter
twitter-log username > username.tweets
twitter-log username max_id > username.tweets.update

Weibo

TODO I want to also backup comments and reposts.

@Martin-Gee
Copy link

Will this work for both android & iPhones?
I will try it out later today, using sock5 and proxies generated from a reputable site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment