Contents
- How it works: three machines and two independent protections
- Before you start: requirements and where to enter commands
- Step 1. Route ChatGPT through the Windows VPN
- Step 2. Connect to the server from Windows over SSH
- Step 3. Connect the proxy and install Codex on Linux
- Step 4. Linux administrator: block Codex from bypassing the proxy
- Step 5. Sign in to Codex
- Step 6. Add the SSH connection in ChatGPT
- Step 7. Select the Linux project folder
- Step 8. Check the routes and run your first task
- How to use the setup after configuration
- If it fails: which step to check first
- Remote Codex FAQ
Who needs this setup? This guide is intended for cases where your Windows workstation and/or the Linux project server that will run Codex are located in Russia or another country where ChatGPT and Codex are unavailable.
Check access separately for each machine. If only the workstation is affected, the separate route is needed on Windows; if only the project server is affected, it is needed on Linux. When both machines are in such regions, the arrangement described here uses both routes: a VPN for ChatGPT on Windows and a proxy for Codex on Linux. If the services are directly accessible from both machines, this workflow does not require a VPN or proxy. The network filters in this guide provide additional protection against direct egress if the chosen route fails.
By the end, you will be able to open ChatGPT on Windows, select a project on a Linux server and assign a task, such as finding a bug. Codex works on the server and you review the result in the app. You do not need to download the entire project to Windows.
What we will configure: Windows access to ChatGPT, SSH access to Linux, a proxy for Codex and a rule blocking direct connections that bypass it. After checking these parts, we will connect the project folder in the app. Linux filter installation is an administrator task and has its own section below.
Want an AI agent to set up the Linux server? Open the ready-to-use prompt (.md), fill in your server details, and give it to the agent together with the filter-source archive.
How it works: three machines and two independent protections
Keep the three machines separate. A VPS is a rented virtual server. In this setup, the overseas VPS provides internet access, while the website code lives on a different Linux server.
- Your Windows PC: you assign tasks in ChatGPT. Its connections use a VPN, a protected network tunnel to the overseas VPS.
- The Linux project server: Codex reads and edits files here. It contacts the AI service through a proxy, an intermediary on the same overseas VPS.
- The overseas VPS: it runs the VPN and proxy, configured to use one fixed outbound IPv4. This is the address the external service sees.
SSH is the secure connection between Windows and the project server. The app uses it to start Codex and receive results. SSH does not give the server your Windows VPN: each machine has its own internet connection.
Why two protections? A route tells an application where to send requests. A network filter prevents direct access if the application ignores that route. Windows uses firewall rules and AppGuard; Linux uses separate filters for Codex. A Windows VPN failure and a Linux proxy failure must be tested separately.
Before you start: requirements and where to enter commands
- The ChatGPT Windows app with SSH connections available, and an account with Codex access.
- A Linux server with a development project folder and administrator access through SSH or the hosting console.
- An ordinary
developeraccount with home/home/developerand permission to work in that project folder. Do not use therootaccount for Codex. - A working VPN and HTTP proxy supporting CONNECT on the overseas VPS. CONNECT carries HTTPS requests through an HTTP proxy.
- Bash, curl, Python 3, nano, Node.js and npm on Linux. Node.js runs this Codex installation; npm installs it.
You can set up the VPN and proxy through the Proksik service. Choose a fixed IPv4, a region supported by the AI service and compatible scenarios on one VPS. IP rotation is unnecessary here. Sharing an IP simplifies checks but does not guarantee account access.
Collect your own values first. The addresses below are documentation examples and do not work. Replace them consistently throughout the commands:
198.51.100.20: project server IP;22: its SSH port.203.0.113.10: overseas proxy IP;3128: HTTP proxy port. This is a different server and a different port.developer: Linux account;/srv/www/project-dev: your development folder.project-linux: a convenient SSH connection name on Windows. You may keep this name.
Who runs the commands? On Windows, search for PowerShell in Start and open it. After connecting with ssh, that same window becomes a Linux terminal: subsequent commands run on the server. Type exit to return to PowerShell. “Linux administrator” below means a separate administrative session; do not grant developer unrestricted sudo just to complete this guide.
~ and $HOME mean the current user’s home directory. Copy each block in full, including EOF lines: they mark the end of a file being written. Run blocks in order. If one fails, resolve the error before continuing.
Ask your administrator to: prepare the account and development-folder permissions, install the listed tools and make Node.js/npm available in the system PATH, the list of directories used to find commands. An interactive-only nvm installation is insufficient for this example. The filters were tested on Ubuntu 22.04.5; other systems need a compatibility check first.
Step 1. Route ChatGPT through the Windows VPN
Split tunneling means only selected applications use the VPN. Our v2rayN split-tunneling setup uses direct as the default route and a proxy rule for the ChatGPT app. Check the actual process names used by your app version; the shortcut's display name alone is insufficient.
We cover the detailed rules, their limits and blocking direct connections when the VPN stops in How to Prevent ChatGPT and Codex IP Leaks When the VPN Disconnects on Windows. Follow that guide for the Windows configuration.
In this arrangement Windows runs the ChatGPT interface, while Codex executes on Linux. Choose the Windows applications to protect accordingly; you do not need a local Codex installation simply to open the remote project.
SSH to the development host can use a direct path if your connectivity and rules allow it. If SSH runs in a separate client process, check its routing separately. An SSH firewall must allow the address from which the SSH connection actually arrives, which is not automatically the overseas proxy address.
Check this step: ChatGPT works through the VPN and the protected app cannot fall back to direct internet access when the VPN stops. Follow the linked Windows guide to test this.
Step 2. Connect to the server from Windows over SSH
Where: PowerShell on Windows. First establish a normal server connection without ChatGPT. This checks the address, key and account independently.
An SSH key pair has a public file and a private file. The public key authorizes access on the server; the private key proves your identity when connecting. Create a separate pair below if you do not have one. Do not overwrite an existing file with this name.
New-Item -ItemType Directory -Force "$env:USERPROFILE\.ssh" | Out-Null
ssh-keygen -t ed25519 -f "$env:USERPROFILE\.ssh\codex_remote_ed25519"
You may set a passphrase when prompted to protect the private key; you will then need to enter it or use an SSH agent. The command creates codex_remote_ed25519 and codex_remote_ed25519.pub.
Linux administrator action: use existing access or the hosting console to append the contents of the .pub file as a separate line in /home/developer/.ssh/authorized_keys. Preserve existing lines. The .ssh directory must belong to developer with mode 700; the file must have the same owner and mode 600. Keep the private key on Windows.
On Windows, open %USERPROFILE%\.ssh\config in Notepad. If absent, create a file named config with no .txt extension. Add this block, replacing the IP, SSH port and account if necessary:
Host project-linux
HostName 198.51.100.20
User developer
Port 22
IdentityFile ~/.ssh/codex_remote_ed25519
IdentitiesOnly yes

Host names the connection, HostName is the server address and User is the account. IdentityFile points to the private file without .pub. Save the file and run in PowerShell:
ssh -F "$env:USERPROFILE\.ssh\config" -o ConnectTimeout=15 project-linux
On first connection, SSH shows the server key fingerprint. Compare it with your administrator or hosting console before accepting. Then run the following in the same window, now on Linux:
whoami
pwd
node --version
npm --version
Expected result: whoami prints developer; after a fresh login, pwd normally shows /home/developer; the last commands print versions. Our test environment used Node.js 22. If you see root, reconnect as the intended account. If a command is missing, finish server preparation first. Do not start Codex yet.
Step 3. Connect the proxy and install Codex on Linux
Agent-assisted setup: English prompt (.md) for steps 3–5. The manual instructions and checks follow below.
Where: Linux, in the developer SSH session. The proxy must accept HTTP CONNECT at a fixed numeric IPv4. This example uses source-IP authorization: allow the public outbound IP of the project server on the proxy, not the Windows PC. If the server is behind NAT, ask the administrator for its actual internet-facing address.
3.1. Save the proxy address
This creates a private settings directory and file. Replace 203.0.113.10:3128 with your IP and HTTP port before running:
install -d -m 700 "$HOME/.config/codex-network"
umask 077
cat > "$HOME/.config/codex-network/proxy.env" <<'EOF'
CODEX_PROXY_URL='http://203.0.113.10:3128'
EOF
chmod 600 "$HOME/.config/codex-network/proxy.env"
No output is normal if there are no errors. Modes 700 and 600 keep the directory and file private from other ordinary users. http:// is correct here: HTTPS requests travel through CONNECT. Use https:// only if the proxy itself accepts TLS and that is the endpoint you were given.
If credentials are required, enter the supplied URL manually in this file with reserved characters correctly URL-encoded. Keep it out of screenshots and repositories. The administrator’s proxy probe later in the guide assumes source-IP authorization.
3.2. Check that the proxy works
. "$HOME/.config/codex-network/proxy.env"
curl --fail --silent --show-error --max-time 20 --noproxy "" --proxy "$CODEX_PROXY_URL" https://api.ipify.org
printf '\n'
The first line loads the settings. curl asks an IP-check service for your public address through the specified proxy. It should print the overseas VPS’s IPv4. Save it for comparison with Windows. 407 indicates an authentication problem; a timeout means no response arrived in time. Resolve address, port or allowlist problems before continuing.
3.3. Install Codex and its proxy launcher
Keep the same SSH session. If you opened another, run the first line of the previous block again. The next block installs Codex in the user’s home and creates a launcher script, a file containing startup commands. Have an administrator review and preserve any existing setup first.
npm --proxy "$CODEX_PROXY_URL" --https-proxy "$CODEX_PROXY_URL" install --global --prefix "$HOME/.local/share/codex-cli" @openai/codex
install -d -m 700 "$HOME/.local/libexec"
cat > "$HOME/.local/libexec/codex-proxy" <<'EOF'
#!/bin/sh
set -eu
. "$HOME/.config/codex-network/proxy.env"
: "${CODEX_PROXY_URL:?Set CODEX_PROXY_URL in proxy.env}"
case "$CODEX_PROXY_URL" in
http://*|https://*) ;;
*) echo 'Use an HTTP CONNECT proxy URL' >&2; exit 1 ;;
esac
export HTTP_PROXY="$CODEX_PROXY_URL" HTTPS_PROXY="$CODEX_PROXY_URL"
export http_proxy="$CODEX_PROXY_URL" https_proxy="$CODEX_PROXY_URL"
export ALL_PROXY="$CODEX_PROXY_URL" all_proxy="$CODEX_PROXY_URL"
export WS_PROXY="$CODEX_PROXY_URL" WSS_PROXY="$CODEX_PROXY_URL"
export ws_proxy="$CODEX_PROXY_URL" wss_proxy="$CODEX_PROXY_URL"
export NO_PROXY='localhost,127.0.0.1,::1'
export no_proxy="$NO_PROXY"
exec "$HOME/.local/share/codex-cli/bin/codex" "$@"
EOF
chmod 700 "$HOME/.local/libexec/codex-proxy"
Most of the block is the contents of codex-proxy. It gives Codex the proxy address through environment variables, settings a program receives when it starts. These settings apply to Codex and tools inheriting them, not to the entire website or server.
The proxy is configured, but direct access is not blocked yet. Do not use the inner codex-proxy script as your final command. The next step adds an outer codex command that first activates protection.
Step 4. Linux administrator: block Codex from bypassing the proxy
Where: a separate administrator session on the project server. Do not run this section on the overseas VPS or in PowerShell. If you do not administer Linux, give it to your administrator together with the proxy address. You do not need to understand every line of filter code, but you do need to check the outcome.
Why this is needed. A proxy setting asks a program to use a route. Some tools can ignore it. Here the Linux kernel enforces the allowed network access for Codex started through the protected launcher.
A cgroup groups Codex and its ordinary child processes. systemd manages the group; two small BPF programs check packets: egress checks outgoing packets and ingress checks replies. You compile supplied source code below rather than writing these programs from scratch.
What will be allowed and blocked
- Connections to your HTTP proxy, shown as
203.0.113.10:3128, and replies from it are allowed. - A local proxy at
127.0.0.1:8118or[::1]:8118is also allowed. This stays within the Linux server and is optional when using a ready-made external HTTP proxy. - Other direct connections from this group are blocked: external HTTPS, UDP, DNS, external IPv6, other local TCP ports and new inbound connections.
SSH and the website retain their own rules: the filter applies to the Codex group, not the whole server. SSH is handled by the separate sshd service. Tools Codex starts inside the group are restricted too; tools without proxy support may lose network access.
4.1. Check the system and install tools
The reference targets an ordinary Ubuntu/Debian host with systemd 249 or newer, cgroup v2 and eBPF support. Restricted containers and some VPS kernels may not provide these capabilities. The example account is developer, with home /home/developer. Grant access to the development project without general sudo privileges.
Reference verification: Ubuntu 22.04.5, kernel 5.15, systemd 249 and Codex CLI 0.160.0 in a separate VM. Checks covered actual kernel attachment, Codex over SSH, blocked direct TCP/DNS/IPv6 and refusal to start without complete filtering. Filters reloaded from disk after a cold start. An authenticated model request was outside this test.
systemd --version
findmnt --noheadings --output FSTYPE /sys/fs/cgroup
bpftool version
The second command should report cgroup2. If bpftool is missing, install the packages below and repeat the check. They build and load the filters. If cgroup2 or BPF support is unavailable, stop and ask the administrator to select a compatible environment. Ubuntu's linux-tools package must match the running kernel:
sudo apt update
sudo apt install clang libbpf-dev gcc jq linux-tools-common "linux-tools-$(uname -r)"
Node.js and npm must also be available through the ordinary system PATH. An interactive-only nvm installation needs additional configuration for this launch method.
4.2. Download the files and enter your proxy address
The Linux filter and launcher source bundle contains the BPF source, loader, cgroup verification and a sudoers template. It is a new-setup example; compare it with existing controls before replacing a managed launcher.
Download the archive and transfer it over SFTP to the administrator’s home on the project server. Then extract it:
mkdir -p "$HOME/codex-network-setup"
tar -xzf "$HOME/codex-linux-network-guard-v1-20261129.tar.gz" -C "$HOME/codex-network-setup"
cd "$HOME/codex-network-setup/codex-linux-network-guard-v1"
Read README_EN.md. Run the build commands from the directory containing guard.bpf.c. Replace PROXY_IPV4 and PROXY_PORT in guard.bpf.c. Convert your IPv4 to a hexadecimal integer with:
python3 -c 'import ipaddress; print(hex(int(ipaddress.IPv4Address("203.0.113.10"))))'
The documentation address becomes 0xcb00710a. Keep the u suffix in the C definition. Use a numeric address: the filter compares packet addresses and the minimal policy blocks direct DNS.
Open guard.bpf.c with nano guard.bpf.c. Set PROXY_PORT to the port in proxy.env. Save with Ctrl+O → Enter → Ctrl+X. The IP and port must agree in both files.
4.3. Build and install the filters
Run from the extracted source directory:
clang -O2 -g -target bpf -I "/usr/include/$(gcc -dumpmachine)" -c guard.bpf.c -o egress.bpf.o
clang -O2 -g -target bpf -I "/usr/include/$(gcc -dumpmachine)" -DFILTER_INGRESS -c guard.bpf.c -o ingress.bpf.o
The second build selects ingress from the same source. An administrator installs the reviewed files into directories that developer cannot modify:
sudo install -d -o root -g root -m 755 /usr/local/lib/codex-guard /usr/local/libexec
sudo install -o root -g root -m 644 egress.bpf.o ingress.bpf.o packet_probes.py /usr/local/lib/codex-guard/
sudo install -o root -g root -m 755 codex-guard-load codex-guard-run /usr/local/sbin/
sudo install -o root -g root -m 755 codex-guard-enter codex-guard-verify codex-guard-probe /usr/local/libexec/
4.4. Install the protected codex command
Attaching filters needs administrator privileges. The sudoers file permits only the prepared loader. It then drops privileges and runs Codex as developer. Edit and validate the file before installing it; do not continue after a syntax error.
Open codex-guard.sudoers.example with visudo. Replace your_command_here with the exact path /usr/local/sbin/codex-guard-run, retaining the template's passwordless-execution tag. This grants access only to that root-owned helper, not arbitrary systemd-run commands or a root shell.
sudo visudo -f ./codex-guard.sudoers.example
sudo visudo -cf ./codex-guard.sudoers.example
sudo install -o root -g root -m 440 codex-guard.sudoers.example /etc/sudoers.d/codex-guard
sudo visudo -c
codex-guard-run accepts the developer caller, loads the programs and creates a scope. Inside it, codex-guard-enter checks both attached program IDs, then uses setpriv to drop privileges and capabilities before starting /home/developer/.local/libexec/codex-proxy. Codex itself does not run as root. Adapt both the helper and sudoers before using another account or home directory.
Install the bundle's outer codex command in /usr/local/bin only for a new installation. Preserve and inspect any existing launcher:
if [ -e /usr/local/bin/codex ] || [ -L /usr/local/bin/codex ]; then
printf 'Existing Codex launcher: review it before making changes\n' >&2
else
sudo install -o root -g root -m 755 codex /usr/local/bin/codex
fi
The outer command passes arguments to a fixed helper and then to Codex after dropping privileges. It does not provide arbitrary root shell execution. The public codex command must resolve to /usr/local/bin/codex, not the inner proxy-only launcher.
4.5. Check: proxy access works, direct access fails
The launcher verifies that both filters are actually attached. If either is missing, Codex does not start. A configuration entry alone is not sufficient.
When no BPF programs are attached, bpftool can return empty output. The verifier rejects it, malformed JSON and missing expected programs, stopping the launch rather than continuing without filters.
An administrator can run probes in a separate temporary scope using the same policy. Load the example objects, then test the proxy:
sudo /usr/local/sbin/codex-guard-load
sudo systemd-run --scope --quiet --collect --property=BPFProgram=egress:/sys/fs/bpf/codex-guide-v1/egress --property=BPFProgram=ingress:/sys/fs/bpf/codex-guide-v1/ingress -- /usr/local/libexec/codex-guard-probe proxy http://203.0.113.10:3128
Use the same endpoint as the C filter. The expected output is the VPS IPv4. Next test a direct TCP connection:
sudo systemd-run --scope --quiet --collect --property=BPFProgram=egress:/sys/fs/bpf/codex-guide-v1/egress --property=BPFProgram=ingress:/sys/fs/bpf/codex-guide-v1/ingress -- /usr/local/libexec/codex-guard-probe directExpect No direct connection: followed by the failure reason. FAILED: direct traffic was not blocked means the protection failed its check; do not use this setup for your workflow yet.
The direct TCP connection should fail before any TLS exchange. The README covers UDP/DNS and IPv6 probes too. Negative tests are meaningful only when the corresponding unfiltered network path is known to work; a host lacking IPv6 does not prove IPv6 filtering.
A request through an unavailable proxy should fail while direct connections remain blocked in the protected group. Do not stop a shared Privoxy or proxy serving other workloads merely to test this.
Reboots, rule updates and limits
Pinned objects under /sys/fs/bpf do not persist as disk configuration. After a reboot the helper loads them again from root-owned .o files and checks attachment. If the kernel refuses, Codex does not start; there is no unprotected-launch fallback.
Replacing a disk object does not update a loaded program or an existing scope. To change an endpoint, finish your protected tasks and roll out a consistent new version, or reload only the example's objects following the README. Do not delete other BPF objects or stop every run-*.scope.
The allowed local proxy must forward through the same intended external exit. This example does not open other local APIs, DNS relays, Docker sockets or arbitrary preview ports. If a project needs another network port, allow a specific peer and port in both directions and repeat the tests. Allowing internet-wide port 443 would defeat the egress restriction.
This protects the controlled Codex launch and its ordinary descendants against accidental direct egress. It does not constrain every process owned by the account, isolate files or Unix sockets, replace the Codex sandbox, or prevent root or a deliberately launched process outside the cgroup from taking another route. Cloud tools, external connectors and browsers outside the group have separate network paths.
See the systemd BPFProgram documentation and Linux cgroup BPF documentation. Test the Windows and Linux boundaries independently: disabling the Windows VPN does not test the Linux filters.
Step 5. Sign in to Codex
Open a fresh SSH session and check the command resolved by the account's login shell:
command -v codex
codex --version
Expect /usr/local/bin/codex. If another installation appears first, correct the PATH order in the login-shell startup file, such as ~/.profile or ~/.bash_profile. The inner codex-proxy launcher does not replace the outer command that installs filters.
codex login --device-auth
codex login status
If your account supports device-code sign-in, open the supplied link in a Windows browser and complete authorization. Check the browser's route if it needs the VPN: a rule for ChatGPT alone does not route another application. Available sign-in methods depend on account and workspace settings; see OpenAI's authentication documentation.
login status confirms cached authentication. It does not prove that a model request has succeeded or used the expected outbound IP.
Step 6. Add the SSH connection in ChatGPT
Where: first the developer Linux session, then the Windows app. Before opening settings, check that the app can find the protected Codex command:
bash -lc 'command -v codex; codex --version'
Expect /usr/local/bin/codex and a Codex version. This checks command lookup in a login shell used by the remote connection. If the path differs or startup fails, resolve it with the administrator first.

Select the saved alias in ChatGPT
Open ChatGPT Settings → Connections → SSH, select the host from OpenSSH config and choose the remote project folder. Our actual host alias is frigate; the example uses project-linux. Do not replace an alias with a bare IP: doing so can bypass the alias-specific user, port and identity settings.

The app starts remote Codex through SSH and the user's login shell, which makes the PATH check important. Labels can vary between app versions. See the official SSH connection instructions.
In our app version, Edit connection also exposes an identity-file path. It points to the private SSH key on Windows. Check that it matches the key intended for the selected OpenSSH config profile. This screenshot edits an existing connection; it does not show creation of a new one.

If SSH stalls with TUN enabled
TUN is the mode in which v2rayN intercepts network traffic. The following exclusion is only needed for the SSH problem described below.
Our Windows PC had a specific failure: TCP connected, but SSH stalled during banner exchange, before key authentication. It connected with TUN disabled. Excluding the development host from TUN resolved that case.
- Open Settings → Tun Mode settings → Route Exclude Address in v2rayN.
- Add the development server's IPv4 with a
/32prefix. Using this article's example:198.51.100.20/32. - Click Confirm, disable and re-enable TUN, then reconnect over SSH.

/32 excludes all traffic to one IPv4 from TUN, not just SSH on port 22. This is a TUN setting, not a rule in Routing Settings or an AppGuard exception. Use it when you intend to reach the server directly and that path is available. If SSH also fails without TUN, check the address, port and server access first.
A TUN exclusion does not override Windows Firewall. If ssh.exe is blocked from direct access, the /32 entry alone is insufficient; the firewall policy must agree with the chosen route.
Select a development directory such as /srv/www/project-dev. You do not need to publish an app-server port for this setup: the app connects through SSH. Access to the public website and Codex access to its project are separate concerns.
Step 7. Select the Linux project folder
Where: ChatGPT on Windows. Select the folder whose files Codex will work with. Choose the SSH source: a local source opens Windows files. Screenshot names are our examples; use your own development folder.
- Open … → Projects and select Create.
- Enter a project name. In the same form, open the source-folder selector and select the SSH source and
project-linux. Our connection is namedfrigate. - Choose the Linux folder, such as
/srv/www/project-dev, and create the project. Thedeveloperaccount must have permission to access it. - Open a chat inside that project. Before assigning a task, check the selected server and directory.




The source and folder are selected in the same project-creation form. A path such as C:\… is a local Windows folder. This guide uses a Linux path such as /srv/… and the selected SSH connection. Choose the development copy, not the live website directory.
Step 8. Check the routes and run your first task
Test the two connections separately, comparing IPv4 on both:
- Windows: use an IP check known to follow the same VPN route as ChatGPT. If the app cannot display its IP, temporarily route a separate test client through the same
proxyoutbound, measure its IPv4 and remove the temporary rule. An ordinary browser connecting directly does not test ChatGPT's route. - Linux: repeat the explicit
curl --proxycheck above. Compare the result with the Windows test and the VPS egress configuration. - Remote Codex: confirm the launcher is selected for the same user's login shell, then open a test project in the app and ask it to read the README without making changes. If you need strict evidence of the process's route, inspect its connections with server-side monitoring.
A curl check proves curl's route, not every connection made by Codex. If IPs differ, check IPv6 in the VPN, Windows profile selection, rotating proxies, multiple public VPS addresses and NAT. A shared server alone does not guarantee a shared egress address.
Proxy variables are not a kill switch. Programs can ignore them, and tools, browsers and external integrations have their own settings. SSH does not automatically use an HTTP proxy either. Blocking direct egress requires separate controls and failure testing. The Linux filtering section above applies kernel restrictions to the Codex cgroup. Test both proxy routing and actual filter attachment; they establish different properties.
First task, without editing files: “Show the current project directory, list its top-level files and briefly explain the structure. Do not change anything.” Verify that the result refers to the Linux folder selected above. A successful response checks the workflow; the network tests above separately verify routing and blocked bypasses.
How to use the setup after configuration
We select the Linux host and development project in ChatGPT, describe a task, review the changes and run checks on the server. Files, dependencies and commands stay in the Linux environment. We do not have to copy the entire website to Windows for every edit.
A suitable first task is:
Read the README and project instructions. Explain the website structure without changing anything. Show the working directory and list the checks available for this project.
Then assign a focused change with a clear result. Keep changes in Git and review the diff. Production updates follow a separate deployment after code review; an SSH connection does not remove that step.
If it fails: which step to check first
- SSH cannot connect: check the host, port, account, private key and the actual Windows source IP allowed by the firewall. A Linux proxy configuration does not repair inbound SSH.
- Codex works in a terminal but not in the app: compare the Linux user and login-shell
PATH. An interactive alias or another installation can bypass your launcher. - HTTP 407 or SOCKS errors: check authorization, the allowed Linux source IP and protocol. A port number alone does not tell you whether the endpoint accepts HTTP CONNECT or SOCKS5.
- Timeouts, connection or certificate errors: check proxy reachability, VPS status, system time and trusted CAs. Do not disable TLS verification to make the test pass.
- Codex responds, but npm, Git or a browser fails: inspect that tool's environment and network permissions. Model access does not grant every tool unrestricted internet access.
- Different Windows and Linux IPs: compare the same address family, VPN profile and proxy endpoint. Confirm that the Windows test actually matched the intended rule.
Remote Codex FAQ
If you only have a SOCKS5 endpoint
You can retain an adapter like our Privoxy listener at 127.0.0.1:8118, then use that local HTTP endpoint in CODEX_PROXY_URL. Configure and test its SOCKS forwarding first. Do not substitute socks5:// into this launcher: the recipe is for HTTP CONNECT. See Privoxy's SOCKS forwarding options. Both forward-socks5 and forward-socks5t resolve names remotely; the t suffix alone is not a remote-DNS switch.
Does the Linux website server need a VPN?
Not for the route described here. Codex uses a proxy without changing the default route of the web server and all its services.
Can one overseas VPS provide both services?
Yes. The Windows VPN and Linux proxy can share a VPS. Check ports, the outbound IPv4 and restricted proxy access. This VPS does not need to host the website itself.
Will enabling the Windows VPN also connect remote Codex?
No. A VPN on the PC routes the PC's traffic. A remote Linux process uses the Linux host's network, so we configure its proxy separately.
Does this override account or service restrictions?
No. This guide describes connection routing and remote development. Product availability, account restrictions and terms continue to apply.
For connection selection, see our guide to proxies for ChatGPT, Claude and AI tools. You can configure the VPS through the Proksik service and follow our Windows split-tunneling and application-protection guide.
Ready-to-use checklist: SSH connects as the intended account; Windows protection has been tested; the Linux proxy returns the expected IP; a direct request from the protected group is blocked; codex resolves to the protected launcher; ChatGPT opens the intended folder and completes the first task. If any check fails, setup is not finished.