Skip to content

Instantly share code, notes, and snippets.

@roycyt
roycyt / opera-vpn.md
Created April 24, 2016 02:53 — forked from spaze/opera-vpn.md
Opera VPN behind the curtains is just a proxy, here's how it works

When setting up (that's immediately when user enables it in settings) Opera VPN sends few API requests to https://api.surfeasy.com to obtain credentials and proxy IPs, see below.

The browser then talks to a proxy de0.opera-proxy.net (when VPN location is set to Germany), it's IP address can only be resolved from within Opera when VPN is on, it's 185.108.219.42 (or similar, see below). It's an HTTP/S proxy which requires auth.

When loading a page with Opera VPN enabled, the browser sends a lot of requests to de0.opera-proxy.net with Proxy-Authorization request header.

The Proxy-Authorization header decoded: CC68FE24C34B5B2414FB1DC116342EADA7D5C46B:9B9BE3FAE674A33D1820315F4CC94372926C8210B6AEC0B662EC7CAD611D86A3 (that's sha1(device_id):device_password, where device_id and device_password come from the POST /v2/register_device API call, please note that this decoded header is from another Opera installation and thus contains different device_id and device_password than what is shown be

@roycyt
roycyt / putty-eclectide.reg
Last active August 29, 2015 14:26 — forked from darekkay/putty-eclectide.reg
Eclectide color theme for the Putty SSH client
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\SESSION_NAME]
; Default Foreground
"Colour0"="217,216,216"
; Default Bold Foreground
"Colour1"="217,216,216"
; Default Background
"Colour2"="28,28,28"
@roycyt
roycyt / gist:1ce98cee6fb56b033911
Created December 10, 2014 01:20
url.insteadOf in .gitconfig
[url "https://github.com/"]
insteadOf = git://github.com/
@roycyt
roycyt / gist:28cec1d1f8fafac39fdf
Created December 8, 2014 15:13
Remap CapsLock to Ctrl
$ sudo vi /etc/default/keyboard
XKBOPTIONS="ctrl:nocaps"
$ sudo dpkg-reconfigure keyboard-configuration
@roycyt
roycyt / .emacs.el
Created February 27, 2014 12:26 — forked from ianb/.emacs.el
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(auto-save-file-name-transforms (quote (("\\`/[^/]*:\\(.+/\\)*\\(.*\\)" "/Users/ianbicking/.emacs-saves/autosave"))))
'(backup-directory-alist (quote ((".*" . "/Users/ianbicking/.emacs-saves/backup/"))))
'(delete-old-versions t)
'(flymake-allowed-file-name-masks (quote (("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init) ("\\.cs\\'" flymake-simple-make-init) ("\\.p[ml]\\'" flymake-perl-init) ("\\.php[345]?\\'" flymake-php-init) ("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup) ("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup) ("[0-9]+\\.tex\\'" flymake-master-tex-init flymake-master-cleanup) ("\\.tex\\'" flymake-simple-tex-init) ("\\.idl\\'" flymake-simple-make-init))))
'(frame-background-mode (quote
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction