{"id":21241775,"url":"https://github.com/TomatoArchive/Pterodactyl-vsc","last_synced_at":"2025-07-10T20:31:07.973Z","repository":{"id":219466268,"uuid":"748985443","full_name":"TomatoArchive/Pterodactyl-vsc","owner":"TomatoArchive","description":"Pterodactyl server files in VS Code","archived":false,"fork":false,"pushed_at":"2025-04-05T03:08:14.000Z","size":448,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-09T00:47:02.123Z","etag":null,"topics":["open-vsx","ptero","pterodactyl","vsc-extension","vsc-filesystem","vscode-extension","vscode-filesystem"],"latest_commit_sha":null,"homepage":"https://open-vsx.org/extension/tomatocake/pterodactyl-vsc","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomatoArchive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-27T08:36:23.000Z","updated_at":"2025-01-10T20:34:44.000Z","dependencies_parsed_at":"2024-02-05T20:22:02.359Z","dependency_job_id":"79469325-9561-4ac3-ab8d-cea82c434da2","html_url":"https://github.com/TomatoArchive/Pterodactyl-vsc","commit_stats":null,"previous_names":["devtomatocake/pterodactyl-vsc","tomatoarchive/pterodactyl-vsc"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/TomatoArchive/Pterodactyl-vsc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomatoArchive%2FPterodactyl-vsc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomatoArchive%2FPterodactyl-vsc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomatoArchive%2FPterodactyl-vsc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomatoArchive%2FPterodactyl-vsc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomatoArchive","download_url":"https://codeload.github.com/TomatoArchive/Pterodactyl-vsc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomatoArchive%2FPterodactyl-vsc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264652664,"owners_count":23644303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["open-vsx","ptero","pterodactyl","vsc-extension","vsc-filesystem","vscode-extension","vscode-filesystem"],"created_at":"2024-11-21T00:56:56.881Z","updated_at":"2025-07-10T20:31:07.146Z","avatar_url":"https://github.com/TomatoArchive.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pterodactyl server files in VS Code\n\n## Usage\n\n1. Install the extension from the [VS Code marketplace](https://marketplace.visualstudio.com/items?itemName=TomatoCake.pterodactyl-vsc), [Open VSX](https://open-vsx.org/extension/tomatocake/pterodactyl-vsc), as VSIX by building it yourself, or by downloading it from the [releases page](https://github.com/DEVTomatoCake/Pterodactyl-vsc/releases).\n2. Open the command palette (default: `Ctrl + Shift + P`) and run `Pterodactyl: Connect to server`.\n3. Enter the panel URL and your client (not application) API key from \"Account Settings\" -\u003e \"API Credentials\" -\u003e Enter description -\u003e \"Create\".\n4. Select the server you want to edit the files of.\n5. Done!\n\n## Configuration\n\n- `pterodactyl-vsc.panelUrl`: The URL of the Pterodactyl panel.\n- `pterodactyl-vsc.serverId`: Server ID of the server you want to edit the files of, found in the URL of the server's page.\n- `pterodactyl-vsc.apiKey`: Client API key of a panel account which has access to the server and enough permissions to view, edit and delete files.\n- `pterodactyl-vsc.proxyUrl`: The proxy URL used to circumvent CORS blocking `fetch` requests to the panel. Leave it at the default value unless you know what you're doing. See [CORS Proxy](#cors-proxy) for more information.\n\n## CORS Proxy\n\nBy default the extension uses the proxy URL `https://pterodactyl-vsc.tomatocake.workers.dev/?url=`.\nThe proxy was created by me to circumvent CORS blocking requests to the panel.\n\nThere are several options available if you don't want to use the default proxy:\n1. Use your own proxy using the following worker code, e.g. by using the following [Cloudflare Workers](https://workers.cloudflare.com) code:\n```js\nexport default {\n\tasync fetch(request) {\n\t\tif (request.method == \"OPTIONS\") return new Response(void 0, {\n\t\t\tstatus: 204,\n\t\t\theaders: {\n\t\t\t\t\"Access-Control-Allow-Origin\": \"*\",\n\t\t\t\t\"Access-Control-Allow-Headers\": \"authorization, content-type, accept\"\n\t\t\t}\n\t\t})\n\t\tif (request.method != \"GET\" \u0026\u0026 request.method != \"POST\") return new Response(void 0, {\n\t\t\tstatus: 405\n\t\t})\n\n\t\tconst proxyUrl = new URL(request.url).searchParams.get(\"url\")\n\t\tif (!proxyUrl) return new Response(\"Missing url param\", { status: 400 })\n\n\t\tlet res = await fetch(proxyUrl, request)\n\n\t\tif (request.headers.has(\"Origin\")) {\n\t\t\tres = new Response(res.body, res)\n\t\t\tres.headers.set(\"Access-Control-Allow-Origin\", \"*\")\n\t\t\tres.headers.set(\"Access-Control-Allow-Credentials\", \"true\")\n\t\t}\n\n\t\treturn res\n\t}\n}\n```\n\n2. If you have access to the domain owning the panel, you can overwrite CORS headers to the panel's responses, e.g. using Cloudflares [Transform Rules](https://developers.cloudflare.com/rules/transform/#transform-rules):\n\u003e [!CAUTION]\n\u003e This will allow any website to access the panel's API using the credentials of the user who's logged in to the panel.\n\u003e If possible, always replace `*` with the hostname of the website the extension is used on, e.g. `vscode.dev`.\n\n- Open the \"Transform Rules\" tab of your domain and create a new response header overwrite.\n- Select \"Custom filter\".\n- Select \"Hostname\" and enter the hostname (e.g. panel.example.com) of your panel.\n- Select URI path with \"Starts with\" and enter `/api/client/servers/`.\n- Add a new static response header with the key `Access-Control-Allow-Origin` and the value `*`.\n\n3. If you want to build the extension yourself and you're only using it locally in the VS Code Desktop app, you can disable the web build of it by removing the `browser` property in the package.json. This works because only web-enabled extensions have to use the JavaScript Fetch API, which is affected by CORS.\n\n## Credits\n\n- Base from [microsoft/vscode-extension-samples](https://github.com/microsoft/vscode-extension-samples/tree/main/fsprovider-sample)\n- Most of the logic from [kowd/vscode-webdav](https://github.com/kowd/vscode-webdav)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomatoArchive%2FPterodactyl-vsc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTomatoArchive%2FPterodactyl-vsc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomatoArchive%2FPterodactyl-vsc/lists"}