Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
set a internal proxy for Youtube API

Youtube bans my country's IP addresses and we can't access Youtube. I try to change Skytube which is open-source to access Youtube without an external VPN or proxy App. I'm going to rent a server in another country to create an OpenVPN or PPTP VPN. can I create an intenal-app VPN that only tunnels my youtube traffic into VPN? how? or I must Add a Proxy java class over NetHttpTransport? and how I do it?

This is the method that initializes Youtube Connection in Skytube: ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡

public static YouTube create() {
        HttpTransport httpTransport = new NetHttpTransport();
        JsonFactory jsonFactory = AndroidJsonFactory.getDefaultInstance();
        return new YouTube.Builder(httpTransport, jsonFactory, new HttpRequestInitializer() {
            private String getSha1() {
                String sha1 = null;
                try {
                    Signature[] signatures = SkyTubeApp.getContext().getPackageManager().getPackageInfo(BuildConfig.APPLICATION_ID, PackageManager.GET_SIGNATURES).signatures;
                    for (Signature signature: signatures) {
                        MessageDigest md = MessageDigest.getInstance("SHA-1");

                        md.update(signature.toByteArray());
                        sha1 = BaseEncoding.base16().encode(md.digest());
                    }
                } catch (Throwable tr) {
                    Logger.e(this, "...", tr);
                }
                return sha1;
            }
            @Override
            public void initialize(HttpRequest request) throws IOException {
                request.getHeaders().set("X-Android-Package", BuildConfig.APPLICATION_ID);
                request.getHeaders().set("X-Android-Cert", getSha1());
            }
        }).setApplicationName("+").build();
    }
over 4 years ago ยท Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!