Proxy
Lantfly has one rotating proxy endpoint in front of several proxy groups (for example datacenter or residential IPs). Actors get it automatically; you can use it from your own code too. Traffic is billed per GB at the price of the group it went through. Open Storage & Proxy → Proxy in the Console.
Connection details
The Connection card shows:
| Field | Meaning |
|---|---|
| Hostname and Port | The proxy endpoint |
| Username | Built from the options below |
| Password | Your account's proxy password (Show / Hide) |
Use Build a connection URL to pick a Group, a Country (two letters, such as VN or US) and a
Sticky session, then copy the URL:
http://groups-RESIDENTIAL,country-VN,session-abc123:YOUR_PROXY_PASSWORD@HOSTNAME:PORT
The same details come from the API:
curl -s "https://lantfly.com/api/v3/proxy" \
-H "Authorization: Bearer $LANTFLY_TOKEN"
The answer has hostname, port, password, a sample connection_url, the groups you can use (with
price_per_gb_usd) and usage_30d.
Username options
The username is a comma-separated list of parts:
| Part | Meaning |
|---|---|
groups-GROUP | The group to use, such as groups-RESIDENTIAL. Join several with + (groups-RESIDENTIAL+DATACENTER). groups-auto lets Lantfly pick any group. |
country-CC | Exit IPs from this country only: exactly two letters, such as country-VN. |
session-ID | A sticky session: requests with the same ID keep the same exit IP while it stays healthy. Pick any ID of your own. |
ttl-MINUTES | How long a sticky session is kept, 1 to 1,440 minutes (10 by default). |
run-RUN_ID | Attribute the traffic to one of your runs, so it shows on that run's usage. Actors set this for you. |
Without session-, each connection may get a different IP.
curl -x "http://groups-RESIDENTIAL,country-VN,session-s1:$LANTFLY_PROXY_PASSWORD@HOSTNAME:PORT" \
https://api.ipify.org?format=json
Groups and countries
The Groups table lists the groups your account can use, what each is for and its Price / GB. A country is
available only where the group has exit IPs in it; if none match, the request fails with
no-upstream-for-country.
Proxy in actors
Actors that run on Lantfly get the proxy hostname, port and password in their environment and use them through the SDK. In an actor's input, the Proxy field usually lets you pick the group and country. Traffic of a run is shown on the run's Usage tab.
Traffic and billing
Traffic, last 30 days shows bytes and requests per group. Proxy traffic is billed per GB at the group's price, in addition to compute. See Billing.
Rotate the password
Click Rotate password (or POST /api/v3/proxy/rotate-password) to get a new password. Code that uses the old
password stops working; running actors pick up the new one on their next run.
In an organization, only members whose role can view the proxy see the password.
Errors
When the proxy refuses or cannot complete a request, the answer carries an X-Lantfly-Proxy-Error header:
| Value | Meaning |
|---|---|
wrong-password | The password is wrong or was rotated |
bad-username | The username could not be read; check the parts above |
no-upstream-for-country | No exit IP in that country for the chosen group |
no-upstream-in-group, no-healthy-upstream | The group has no working exit right now; try again or pick another group |
forbidden-target | The destination is not allowed (private networks, or ports other than 80 and 443 on direct groups) |
target-failed, target-unreachable | The destination site did not answer |
upstream-failed | The exit failed; the proxy retries once on another exit before giving up |
Idle tunnels are closed after 5 minutes without traffic, and a tunnel lasts at most 2 hours.