Giter Site home page Giter Site logo

rdpickard / link_unwrapper Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.28 MB

Web service to get the URL of links that are obscured by intermediary ad tracking tools such as 'shorteners'.

License: Creative Commons Zero v1.0 Universal

Procfile 0.65% Python 42.18% Jinja 57.17%

link_unwrapper's Introduction

Link unwrapper

Deploy

Web service to get the URL of links that are obscured by intermediary ad tracking tools such as 'shorteners'.

Link intermediaries are used by ad companies to track you by acting as middle men between URLs. They provide no value to the consumer of the link (you) and create bloat, delay and security threats by hiding the actual location of a link.

Link Unwrapper is a simple web service with only one API endpoint that takes in a URL from a link shortener and returns the actual URL. The service does no tracking, keeps no records of who requested what link to be unwrapped. It does keep a tempory cache of shortend to full links for effiencey but no user data is stored in the cache.

This version is intented to run on Heroku. The web service can be run locally for testing but that is likely to expose your IP to the URL shortener service which may weaken the ad tracking protections of Link Unwrapper. Running in the cloud means the unrwapping will be done from a differnet IP (the cloud service's) than the shortened URL was served to (your IP). Getting a running instance on Heroku is pretty easy with github integration. So you can run your own instance.

Ad tech is intentionally opaque so it is not clear to me how much of an impact link unwrapping will have on privacy preservation. This is an experiment.

Example GUI in Heroku

Example command line to RESTful endpoint

Usage

Simple HTTP GET to the RESTful endpoint /api/unwraplink/[URL encoded shortened link].

For example to unwrap the link https://t.co/mB1G4eZhTn the REST HTTP GET to the host link-unwrapper.heokuapp.com would be

 curl https://link-unwrapper.herokuapp.com/api/unwraplink/https%3A%2F%2Ft.co%2FmB1G4eZhTn

The REST call will respond with the following status codes

  • 404 if the wrapped URL returned a 404
  • 412 if the GET request to the wrapped URL did not respond with a redirect status code of 301, 302, 303, 307 or 308
  • 417 if the response to the GET wrapped URL did not include a location header
  • 200 if the wrapped URL was a redirect and had a location header

The body of the response will be a json document in the format

{
    "message": "some message",
    "location": "unwrapped URL value or NONE in case of an err"
}

Next work

Make a Firefox plugin that alters pages to unwrap detected shortened URLs

Things I don't know

  • Do Twitter shortened links expire?
  • Are all Twitter shortened links the same for all users?
  • Other link shortener services

link_unwrapper's People

Contributors

rdpickard avatar

Watchers

James Cloos avatar  avatar

link_unwrapper's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.