Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blahgeek/shadowshorten
https://github.com/blahgeek/shadowshorten
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/blahgeek/shadowshorten
- Owner: blahgeek
- Created: 2015-05-26T10:02:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-27T13:23:32.000Z (over 9 years ago)
- Last Synced: 2023-06-06T15:36:21.943Z (over 1 year ago)
- Language: Lua
- Size: 531 KB
- Stars: 30
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# ShadowShorten
- It's an URL shortener.
- It's a HTTP proxy for chinese users.
- It uses lua, nginx and redis (openresty)[中文介绍](http://blog.blahgeek.com/ShadowShorten/)
[Demo](http://blaa.cf/4djtgp6c) (Visit it from chinese, otherwise it's just a shorten URL, nothing more)
## How it works
When it's going to shorten an URL, it checks if this website is blocked in china (via greatfire.org). If it is, it will provide a proxy to chinese user who visit it.
## How to run
- Install openresty with some extra module: `--with-http_spdy_module --with-http_sub_module --with-http_geoip_module`
- Install some extra lua lib (and set correct `lua_package_path` in your main `nginx.conf`):
- [lua-resty-template](https://github.com/bungle/lua-resty-template)
- [lua-resty-http](https://github.com/pintsized/lua-resty-http)
- Add `geoip_country GeoIP.dat;` to your main `nginx.conf` (download it from somewhere)
- (Optional) Get a wildcard SSL certification for you proxy domain and configure it in your main `nginx.conf`
- Link `ShadowShorten` directory to `/etc/nginx/apps/`
- Add `include /etc/nginx/apps/ShadowShorten/nginx.conf` to your main `nginx.conf`
- Copy `auth.htpasswd.sample` to `auth.htpasswd` and change the password
- Change `ShadowShorten/nginx.conf` as you need (domain names etc.)
- Run nginx (openresty)## How to use
`http --form --auth user:passwd http://blaa.cf/new url="http://baidu.com"`(httpie)