[0.1.0d] pProxy - Webproxy for Picotron

Published 2023-06-12


This is the first release, so its still very much a work in progress, so far you can...

For ideas, bugs, or help, contact me on the Picotron discord
https://discord.gg/XQStcpPeH4

http pproxy.pyrochiliarch.com 8080

If you are trying to run a project that relies on pProxy, follow these instructions.
Details for devs are further down.

1) Load the installer with load #pproxy and run it ctrl+r to install

2) Configure which proxy server to use with pProxy config http pproxy.pyrochiliarch.com 8080

3) Use pProxy test to check you connection, it should print the server version

The #pproxy cartridge is an installer, load it load #pproxy and run it ctrl+r to install

Once installed, configure the pProxy library to point to your proxy server using the pProxy command
Use the following settings to use a public server pProxy config http pproxy.pyrochiliarch.com 8080

You may want to setup your own server, which can help with development.
https://github.com/PyroChiliarch/pProxy
Instructions to setup are in the github readme

pProxy test will check your configuration settings
pProxy help will print additional commands

Write a script
There are 4 main steps
1) Make a proxy newProxy()
2) Make a client newHttpClient()
3) Craft a request newRequest("get", "http://www.google.com", "")
4) Make the request doRequest(client, request)

A simple script would look like this
Note: the proxy and client should be reused

<br><br>
The example below performs multiple different example request that should help
you understand how pProxy is used.
Near the end of this post is documentation on functions

Extra details:

Whats installed:
The pProxy.lua library is installed to /appdata/system/lib/pProxy.lua
The dynInclude.lua library is installed to /appdata/system/lib/dynInclude.lua
The pProxy.lua command line configuration utility is installed to /appdata/system/lib/dynInclude.lua

Functions:
Format: (return) function (parameters)