Connect to GitHub REST API behind proxy


#1

So, I’m building a software and I want to implement a update notifier through the github api like this,

$(document).ready (function () {
    $.getJSON("https://api.github.com/repos/user/repo/tags").done(function (data) {
        var new_ver =data[0].name
        if(new_ver!=cur_ver){
            alert(`New version ${new_ver} available.`)
        }
    })
});

This works fine for direct network connection with no proxy. But how do I implement this if I had to use a proxy, port with user authentication to connect to the internet, as this method can’t connect to the api.