moyix / fauxpilot

FauxPilot - an open-source GitHub Copilot server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do we know the server name used by CoPilot?

HughPH opened this issue · comments

Hi,

I'm using the JetBrains CoPilot plugin which is not configurable. I've tried setting api.openai.com in my hosts file, but the server isn't being hit.

Is it a different hostname, such as copilot.github.com or something?

Thanks!

Do you mean for use with FauxPilot? If so, then you want to point it at http://localhost:5000, as mentioned in the README. I'm not sure what the URL for the official Copilot servers is, but you should be able to dig it out of the VSCode plugin.

Do you mean for use with FauxPilot? If so, then you want to point it at http://localhost:5000, as mentioned in the README.

No, I have that, and I've configured nginx as a reverse proxy with a self-signed certificate so I can just redirect requests to the machine hosting fauxpilot. The problem is that the plugin is not configurable, so there's nowhere for me to put http://localhost:5000 (or any other location)

I'd like to find out the address without having to install VSCode and a plugin, but if that's the only way then that's what I'll do.

Looking at some javascript associated with the JetBrains plugin, it looks like it's probably copilot-proxy.githubusercontent.com

Unfortunately when I change the hosts file to point to where it's hosted, the plugin just fails without apparently hitting the server. It may be allergic to the self-signed certificate: the server side logs only an error: "Unexpected EOF while reading" which suggests the client side cut the connection right after discovering the certificate was invalid. To go further I would need to create my own CA cert and install it locally, and sign my nginx cert with that CA cert - and even then it might not work: I notice the same javascript references /engines/copilot-codex, /engines/${a} (so presumably it can be remotely configured per user), and /engines/copilot-experiment-e-centralus

Yes, unfortunately modern TLS stacks tend to reject self-signed certs. If they don't have an override setting like the VSCode plugin does, then you may be out of luck, short of modifying the plugin code (which is doable I think; it's just JavaScript).