Coder Social home page Coder Social logo

whatever-origin's Introduction

This project is NO LONGER MAINTAINED

Transitioning The Live Site.

TLDR: Code will be rewritten in Go and the live site will be under new management while seeing no functionality change.

Currently the Java backend has become sluggish and outdated by modern standards and we've decided to rewrite it in Go, the Java code will remain accessible on the java branch.

This transition will not effect your usage. We will start by allocating small amounts of the traffic to the new server (to lower the risk of outages).

Date Allocation State
January 10th 1%
January 17th 10%
January 24th 25%
January 31st 50%
Febuary 7th 75%
Febuary 14th 100%

Whatever Origin is an open source alternative to AnyOrigin.com

When I was facing Same Origin problems while developing Bitcoin Pie, I was excited to discover how anyorigin.com solved the issue for me ... only, a week later it stopped working for some https sites.

For example, right now try and feed https://bitcointalk.org/ into anyorigin and you'll get an ugly "null" as the output.

Having recently discovered Heroku and Play!, I found that deploying a simple server app is no longer a big deal, and so made out to develop a simple, open source alternative to Any Origin.

Live site.

whatever-origin's People

Contributors

astrocb avatar linden avatar macdonjo avatar ripper234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatever-origin's Issues

Looking for a partner to maintain whatever origin

I have not been maintaining whateverorigin.org for a while, but it is in production use.

(Google Analytics Data).

I am looking for someone to join as a full partner in the project. She will take full responsibility to operations of the website and adding new features as needed.

In response she will get "50% ownership" of the website.

Note that currently the website is a fully non-profit project, it doesn't earn any revenue nor does it cost anything to run, so this is purely theoretical at this point. However it can be a fun experience for someone who wants to learn to operate a production website.

(Just see the issues people open over the years - this website has its userbase).

if you're interested, please post a followup on this github issue.

Shutdown notice

!!! The live website for this project will SHUT DOWN on June 1st 2021 due to lack of maintainers !!!
You are welcome to fork it or join this project as a maintainer.

As there is demand from the public - the service will continue at this address at least until 2022.

This project is not maintained. Please also checkout alloworigin, written in Django.

Request 404 error

Hello.

I try code in my script (js):

$.getJSON('http://whateverorigin.org/get?url=' + encodeURIComponent('https://widgets.getpocket.com/v1/button?count=horizontal&url=' + location.href) + '&callback=?', function(response) {
  console.log(response.contents);
});

But Google Chrome console always return this response.contents (i.e. error page):

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /v1/button?count=horizontal&amp;url=http://mysite.com was not found on this server.</p>
<hr>
<address>Apache Server at widgets.getpocket.com Port 80</address>
</body></html>

If change your URL to http://anyorigin.com/dev/get?url= then show right request:

<html>
<head>
<link rel="stylesheet" type="text/css" href="https://d7x5nblzs94me.cloudfront.net/v1/c/button.css?v=6" />
<script type="text/javascript" src="https://d7x5nblzs94me.cloudfront.net/v1/j/shared.js?v=2"></script>
</head>
<body>

<div class="widget horizontal pocket left">
    <a id="btn">
                <!-- 
        Please do not scrape this for the Pocket count. 
        It is not relible for you to use and will likely change. 
        Contact us at [email protected] for an official API. 
        Thanks! 
        -->
        <span><em id="cnt">1</em><i></i><u></u></span>
                <b></b>
    </a>
</div>

<script type="text/javascript">
var POCKET_DOMAIN = 'getpocket.com';
var iLi = false;

var btnData = {"mode":"viapocketbutton","ct":"00394812dab479a2e02fddb28bc37f113c5f18da","ctn":"b04a68245e730401ebb4ab8c55ce873bf5fb9c4a","label":"pocket","count":"horizontal","src":"","url":"http:\/\/mysite.com"};
</script>
<script type="text/javascript" src="https://d7x5nblzs94me.cloudfront.net/v1/j/button.js?v=5"></script>
</body>
</html>

Whats wrong? Help me please, if you can!

Not working with xmlhttprequest

It works for me using jquery like in the example but I can't get it to work with vanilla js.

var doc;
var xhr = new XMLHttpRequest();
  xhr.onload = function (event) {
console.log(this)
console.log(event)
  }
  xhr.open("GET", 'http://www.whateverorigin.org/get?url=' + encodeURIComponent('http://google.com'));
  xhr.responseType = "document";
  xhr.send()

What's wrong?

I get

Access to XMLHttpRequest at 'http://www.whateverorigin.org/get?url=http%3A%2F%2Fgoogle.com' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
VM6103:9 GET http://www.whateverorigin.org/get?url=http%3A%2F%2Fgoogle.com net::ERR_FAILED

How to upload this to Google App Engine?

This is Java, right?

Why in Eclipse + Google plugin has only folder structure like this

  • src
  • war
    -- WEB-INF

Google app engine upload folder -war

how do I upload Whatever-Origin / app / controllers / Application.java to google app?

I'm newbie

I want to run this thing on appspot for personal use

Personal Deployment

I want to deploy this on my own hosting. How would I do that properly and how would my call be made once I do it?

Incorrect escape of url

The URL is incorrectly escaped: ? becomes %3F:

http://whateverorigin.org/get?url=http%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3DFoo%2520bar&callback=x
http://whateverorigin.org/get?url=http://www.google.com/search?q=Foo+bar&callback=x

Actual result (status key) for the first URL:

{
    "url": "http://www.google.com/search%3Fq=Foo%2520bar",
    "content_type": "text/html; charset=UTF-8",
    "http_code": 404
}

Expected result:

{
    "url": "http://www.google.com/search?q=Foo%20bar",
    "content_type": "text/html; charset=UTF-8",
    "http_code": 200
}

What happened to your site?

I have been using this for quite awhile. Recently I discovered it is no longer working on my site.
Then I found out your live site is down.
Is there a problem?

Are you still having a DNS issue?

I'm asking this since your website has been going up and down for a while. Is it still the same problem you stated 9 days ago? Is there anyway we could help?

No Handler for URL

I am using the code exactly as it is online and I get the following error:

Object {contents: "No handler for URL", status: Object}

as the data returned.

This doesn't happen on all URLs so I am confused as to why this could sometimes be happening.

Bug with Greasemonkey or Tampermonkey extensions

I tried to use Whatever-Origin with a extension that i'm developing for Chrome/FF and I encounter an issue with the reference of the jQuery instance.

Here's the code:
var url = encodeURIComponent("http://www.google.com");
$.getJSON('http://whateverorigin.org/get?url=' + url + '&callback=?',
function(data) {
var html = data.contents;
console.log(html);
}
);

The error:
Uncaught ReferenceError: jQuery110202550689787603915_1396538223703 is not defined

I tried to create a nonConflict instance but i'm not been succesfull too, at this time i'm trying to find a way to send to Whatever-Origin the solid name of the reference that i'm invoking the method.

PS: I don't know if this is the correct page to put a bug report, i'm sorry if i did wrong i just want to let you know about this issue.

Running on linux?

Hey, I might need to use your project.

Any tips on getting it to run on a linux/apache2 server?

Cheers! Rikki

Please support HEAD requests!

I need to get the file size of large videos, so I wrote this function :

function GetFileSize(Url){
  var size;
  var ajax = new XMLHttpRequest();
  ajax.onreadystatechange = function () {
    if (this.readyState == this.DONE) {
      size=ajax.getAllResponseHeaders();
      size=parseInt(ajax.getResponseHeader("Content-Length"));
    }
  };
  ajax.open('HEAD', Url, false); // <-- the 'false' makes it synchronous, and the 'HEAD' avoid to download the whole file
  ajax.send(null);
  return size/1048576;
}

which doesn't work, and it appear you don't supportHEADrequests :

HEAD /get?url=artestras.vo.llnwd.net/v2/am/HBBTV/048730-000-A_SQ_2_VF-STF_01483166_MP4-2200_AMM-HBBTV.mp4 HTTP/1.1
Host: www.whateverorigin.org
User-Agent: Mozilla/5.0 (compatible; MSIE 11.0; Windows NT 6.1; Win64; x64; Trident/7.0; .NET4.0C; .NET4.0E; InfoPath.3) Opera/12.50 Presto/2.12.378
Accept: text/html, application/xml;q=0.9, application/xhtml xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Connection: Keep-Alive, TE
TE: deflate, gzip, chunked, identity, trailers


HTTP/1.1 500 Internal Server Error
Date: Sun, 05 Oct 2014 02:35:46 GMT
Connection: keep-alive
Server: Play! Framework;1.2.3;prod
Set-Cookie: PLAY_ERRORS=;Path=/
Content-Type: text/html; charset=utf-8
Content-Length: 417
Via: 1.1 vegur

The real site work as expected when it receive the request, but the brother reject the content (because of SOP):

HTTP/1.1 200 OK
Server: nginx/1.0.12
Content-Type: video/mp4
Accept-Ranges: bytes
X-Agile-Checksum: 5914f511b20f4e0563508cf629dfffa9bbe452ec7a64edd27cfb5a01622597ed
Age: 65997
Date: Sun, 05 Oct 2014 02:14:02 GMT
Last-Modified: Sun, 28 Sep 2014 19:42:44 GMT
Content-Length: 1577111989
Connection: keep-alive

Internal server error on requesting an unescaped URL

Some characters in the request URI are causing trouble. I first noticed the bug on the space character. Using %20 or + yields the same error. Upon further investigation, I've found many other characters which break the service:

  • Anything between (inclusive) 0x01 and 0x20. These include the tab, carriage return, line feed and space characters.
  • " (%22) - Double quote
  • % (%25) - Percent sign
  • Backslash, square brackets, curly braces, and probably many more.

Examples:

Current solution

The current method to get it to work is to escape the URL twice:

var actualrequest = 'http://example.com/" test+%';
var jsonp_request = 'http://whateverorigin.org/get?url=' + encodeURIComponent(encodeURI(actualrequest));

This looks awkward. encodeURI should not be needed.

Service is down?

I always get a 503 since about yesterday, any idea why?

For example:

$.getJSON('http://whateverorigin.org/get?url=' + encodeURIComponent('http://google.com') + '&callback=?', function(data){
    alert(data.contents);
});
Remote Address:23.23.143.170:80
Request URL:http://www.whateverorigin.org/get?url=http%3A%2F%2Fwhateverorigin.org&callback=jQuery1110046431685192510486_1415892161471&_=1415892161472
Request Method:GET
Status Code:503 Service Unavailable

Follow redirects

Why are redirects not followed by default? Are there any plans for development?

Connection refused

when i try the example fro whateverorigin.org main page? i get the following error in browser console:
GET https://whateverorigin.org/get?url=https%3A%2F%2Fgoogle.com&callback=jQuery21302342975828796625_1446012234681&_=1446012234682 net::ERR_CONNECTION_REFUSED

Doesn't work with ? for parameters.

The URL scheme forces you to use ampersands after the first ? for parameters. This means you can't currently use Whatever Origin to get a website which uses parameters as you are forced to start the parameters in the requested website's URL with an ampersand which doesn't work, as a question mark is used at the beginning.

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.