Hello guys, in this tutorial i will show you how to make your own proxy for roblox. With this proxy you will be able to access roblox.com resources without using different proxies like roproxy. Let’s start without further ado.
Firstly we will create a google apps script, this will be the server for our proxy.
Go to your google drive and click “New” on the top left corner
Click More > Google Apps Script
A menu like this should be opened:
Now we will write our code
// Define the doGet function, which handles incoming HTTP GET requests.
function doGet(e) {
var output; // Declare a variable to store the response data.
try {
// Retrieve the "q" query parameter from the request URL.
var query = e.parameter["q"];
// Make an HTTP GET request to the URL specified in the "q" parameter.
var response = UrlFetchApp.fetch(decodeURIComponent(query));
// Create a success response with "result" set to "success" and "response" containing the fetched JSON data.
output = {"result": "success", "response": JSON.parse(response.getContentText())};
}
catch(e) {
// Handle any exceptions (errors) that occurred during the try block.
// Create an error response with "result" set to "error" and an "error" message.
output = {"result": "error", "error": "Unable to fetch"};
}
// Create a JSON response from the output object and set the MIME type to JSON.
return ContentService.createTextOutput(JSON.stringify(output)).setMimeType(ContentService.MimeType.JSON);
}
This code will handle all of the “GET” requests to the server and return the data. More information is written as comments in the code.
Now, our google apps script code is done. Save the script and click deploy on the top right
And then click new deployment, select web app type, execute as me, and allow access to everyone
And then click deploy, when the deployment is finished, copy the URL.
Now your proxy is running, we need to make the script in roblox studio.
Open up a place in roblox studio and create a module script in serverstorage. And write these
local http = {}
local HttpService = game:GetService("HttpService")
function http.getasync(targetURL)
local proxyURL = "YOUR PROXY URL THAT YOU HAVE COPIED"
local query = "?q=" .. HttpService:UrlEncode(targetURL)
local response = HttpService:GetAsync(proxyURL .. query)
local decodedResponse = HttpService:JSONDecode(response)
if decodedResponse.result == "success" then
return response
else
return "Error fetching data:", decodedResponse.error
end
end
return http
This code will use the proxy to get and return the appropriate data.
How to use the module:
Create a new script in serverscriptservice and type these:
local http = require(game.ServerStorage.HTTP)
print(http.getasync("https://users.roblox.com/v1/users/424762688"))
Warning: Don’t forget to enable http requests for your game. Type this in the console to activate http service
game.HttpService.HttpEnabled = true
This script will use our proxy to get data from roblox website and print it out to the console, and now everything is ready! You can start using your proxy now and get the coolest data on roblox