Http:proxy([proxy_server], [username, password])

Sets the proxy server connection.

Calling this method without arguments will disable proxy server connection, using only HTTP direct connection.

Parameters

[proxy_server]

An optional string representing the proxy server address.

[username, password]

An optional string representing the proxy user name and password.

Return value

This function returns a boolean value indicating if the operation was successful.

Example

local net = require "net" local client = net.Http("https://www.google.com") -- set a proxy connection with the server at 88.32.132.44 using port 8080 client:proxy("88.32.132.44:8080")