Git Product home page Git Product logo

elongator's Introduction

FixTweet Elongator

Elongator is an internal proxying service used to circumvent Twitter's restrictions disallowing access to sensitive/NSFW Tweets from the guest API. FixTweet relies on the guest API to provide unauthenticated access to Tweets, so in instances where Twitter excludes Tweets from the guest API, FixTweet will be able to access them through elongator.

Elongator works by stamping the incoming request with an auth_token and csrf token from a real Twitter account, and requests are spread out among many accounts for more even rate-limit wearing. For GraphQL requests, we also include valid per-account csrf tokens which is required for GraphQL functionality.

You can pull the auth_token and csrf token from the headers of outgoing requests from your proxy account (i.e. Looking through Cookies or Network tab in your browser's dev tools, auth token is auth_token and csrf is ct0)

This method of implementation helps reduce a single point of failure, as Twitter cannot easily shut down elongator at-will without otherwise breaking the compatibiltiy of their API for existing clients, so we have a buffer to fix changes they may make as they arise.

Warning: It is possible that Twitter can lock individual accounts. Usually, Twitter will lock accounts for automated activity up to 2 times and generally not ask again afterwards as long as you don't post tweets, etc.

credentials.json has a password field but we do not currently use it for anything. Originally, we were going to have a system to re-authenticate if necessary, but this turned out unnecessary; auth tokens don't seem to expire for a really long time (if not indefinitely) so that is unlikely to affect you any time soon.

Setup

Requirements

  • Latest LTS Node.js, and NPM
  • Basic understanding of Cloudflare Workers and Service Bindings
  • A lot of Twitter accounts

Installation

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Set up credentials in credentials.json
  4. Configure wrangler.toml with your Cloudflare account ID
  5. npm run reload to upload the worker to Cloudflare and open a log
  6. Make sure FixTweet is set up with your elongator service binding in its wrangler.toml

elongator's People

Contributors

dangeredwolf avatar

Stargazers

白雲 avatar Marcos Silva avatar Fuki avatar Jo avatar Robin avatar limichange avatar Taras Glek avatar Joshua L. avatar seeumara avatar Vlad Vaviloff avatar Z avatar  avatar under. avatar Luna avatar Chetan Sarva avatar Thomas Lekanger avatar Timo Tijhof avatar Space avatar  avatar Leechael avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

elongator's Issues

Elongator never succeeds ("Couldn't authenticate" / "Response Code 429")

Hello, firstly thank you for this awesome project!

I have successfully launched both Cloudflare workers but I'm running into an issue with Elongator.

I have populated the credentials.json file with accounts (username + authToken, same formatting as in example), but Elongator either returns "couldn't authenticate you" or "No data was sent. Response code 429. Data sent."

I'm not sure what I'm doing wrong. I have also tried using only accounts that I am logged into on my browser, and grabbing the authToken directly from the cookies, without success.

Your help is appreciated! :)

No requests done via FixTweet

Hello.

I setup up this earlier today and it looks like elongator is staring up fine. However, when setting it up with FixTweet and pushing the change to CloudFlare, I cannot see anything happening on logs regarding FixTweet even contacting elongator service nor elongator even log anything.

I am using the example wrangler.toml files with my own CF account so I doubt its that. Or is there something else I am missing from the install instruction and from #1 ?

Getting the auth_token

Hello,

I apologize for the novice question.

But how can I get the auth_token required by the credentials file? I've successfully deployed FixTweet to Cloudflare Workers however, I am having issues with NSFW videos and require Elongator for that.

The auth_token is required for Elongator to function since passwords aren't being used currently.

Where can I get the auth_token for the Twitter account I plan to use with Elongator? Is it the same as the Bearer Token?

Thank you.

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.