Configuring Proxy Session ID & Lifetime
Configure proxy session duration and custom session IDs to control how long connections remain active.
Control the duration of your proxy sessions by setting a custom session ID and lifetime. This allows you to maintain stable connections for extended periods, which is essential for tasks requiring persistent IP addresses.
Lifetime Parameter
The lifetime parameter is measured in minutes and defines how long the session remains active:
| Constraint | Value |
|---|---|
| Minimum | 3 minutes |
| Maximum | 1440 minutes (24 hours) |
| Default | 10 minutes |
Examples:
lifetime: 5→ 5 minuteslifetime: 30→ 30 minuteslifetime: 60→ 1 hourlifetime: 180→ 3 hours
Session ID Rules
Your custom session ID must follow these rules:
- Format: 1-25 alphanumeric characters or underscores (
_) - Regex pattern:
^[A-Za-z0-9_]{1,25}$ - Valid characters: Letters (A-Z, a-z), digits (0-9), and underscores
- No spaces or special symbols allowed
Examples of valid session IDs:
session123my_session_01ABC123
Request
curl --request GET \
-x "http://proxy.geonode.io:<port>" \
--user "<geonode_username>-session-<session_id>-lifetime-<lifetime>:<geonode_password>" \
--url "http://ip-api.com/json"Response
200 Success
Proxy session created successfully with the specified lifetime.
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | The status of the request (e.g., "success") |
continent | string | The continent where the IP is located |
continentCode | string | The two-letter continent code |
country | string | The full name of the country |
countryCode | string | The two-letter country code |
region | string | The region code |
regionName | string | The full name of the region |
city | string | The name of the city |
district | string | The district name, if available |
zip | string | The postal code associated with the IP |
lat | number | The latitude coordinate |
lon | number | The longitude coordinate |
timezone | string | The timezone of the IP location |
offset | integer | The time offset in seconds from UTC |
currency | string | The currency code of the country |
isp | string | The name of the Internet Service Provider |
org | string | The organization that owns the IP address |
as | string | The Autonomous System (AS) number |
asname | string | The name associated with the AS number |
mobile | boolean | Indicates whether the connection is from a mobile network |
proxy | boolean | Indicates whether the IP is a known proxy |
hosting | boolean | Indicates whether the IP is from a hosting provider |
query | string | The queried IP address |
Example Response
{
"status": "success",
"continent": "Africa",
"continentCode": "AF",
"country": "Algeria",
"countryCode": "DZ",
"region": "05",
"regionName": "Batna",
"city": "Batna City",
"district": "",
"zip": "05000",
"lat": 35.5064,
"lon": 6.0707,
"timezone": "Africa/Algiers",
"offset": 3600,
"currency": "DZD",
"isp": "4 djaweb de AS fawri",
"org": "",
"as": "AS36947 Telecom Algeria",
"asname": "ALGTEL-AS",
"mobile": false,
"proxy": false,
"hosting": false,
"query": "192.168.1.1"
}