Hosting your server in a different location and need to access the data is only available in your location, this is a goto solution if you want to set your proxies for FREE * ..
(* Free) ~ You have to use your resources to login to your server proxy room and set them up, and nothing much 😸.
- v1.1.2 ~ stable pre-alpha
- Support for Arrays in getProxiedData()
- The main idea is to use your own device IP in the location you need and access the data, and proxy them back to the server at a different location.
- Secondly it uses your own resources for proxying the data, so no worries about data leaks, (note : YOUR DEVICE IP will not be altered, so they remain visible.)
- [x] Support for GET Requests
- [x] Support for JSON
- [x] getProxiedData() supports Array of urls
- [ ] Support for POST Requests
-
let cassata = require('cassata');
-
- Make sure you change the default proxy room auth details. By Default
- PROXY ID : 12345
- PASSWORD : admin
cassata.proxySettings.roomId = "Your Room ID"; cassata.proxySettings.password = "Your Password";
- Make sure you change the default proxy room auth details. By Default
-
const express = require('express'); const app = express(); // ... your declarations app.get('routes', async(req, res)=>{});
-
-
-
- You can wrap the method inside a get request and wait for it, or also have seperate method and call them.
-
app.get("/samplRoute", async(req, res)=>{ try{ const response = await cassata.getProxiedData("the url that you want to hit"); // process the response. } catch (error) { // Error handling, Cassata will return an error } })
-
//Creating an async function, async function foo(){ try{ const response = await cassata.getProxiedData("the url that you want to hit"); // process the response. } catch (error) { // Error handling, Cassata will return an error } } // Call the function foo(url) with a await call 'await foo(url)' at your will, and get the data.
-
// Prepare the array of urls that you need to get the data from the proxy client let urlsArr = ["https://", "https://"] //Array of urls app.get("/vaccine", async (req, res) => { try { // Pass the Array in the method to get the results in the order you passed in let results = await cassata.getProxiedData(urlsArr) //Handle the results res.status(200).send(results) } catch (error) { console.log(error.message) } })
-
-
-
const express = require('express'); const app = express(); // mention all middle wares app.use() // mention all your routes app.get() app.post() // mention all your static files app.use("/", express.static()) // **** Initialize the proxy server **** let proxyServer = cassata.createProxy(app) proxyServer.listen(PORT, ()=>{ console.log("Server started") // your initializations // !! Provide a buffer so you can get enough time to activate the proxy. })
-
// Creating the express server const express = require('express'); const app = express(); // Importing the Package const cassata = require("cassata"); cassata.proxySettings.roomId = "@123$32"; cassata.proxySettings.password = "$ource#12"; // This will be your API end point that is only available in your location const API_END_POINT = "https://*" // Method 1 ~ Suitable for instant response. app.get("/", async (req, res)=>{ console.log("This is from your get request section") try { const response = await cassata.getProxiedData(API_END_POINT); // Process the response object here : {success : boolean, data : Response from API_END_POINT} } catch (error) { // Handle your errors here } }); // Method 2 ~ Suitable for making multiple API calls async function foo(url){ try { const response = await cassata.getProxiedData(url); return response.data; } catch (error) { return error; } } // ** Now you can call the function foo(url) with a await call 'await foo(url)', at any point and get the response. // ** set your static files app.use(express.static(**)); // After setting up all the static files, make sure you create the proxy server, let proxyServer = cassata.createProxy(app); proxyServer.listen(process.ENV.PORT || 5000, ()=>{ console.log("Server started"); // Your initializations })
-
CASSATA only allows one session per time, so once connected, another session of CASSATA will not be available until you terminate the session through RELOAD / Terminate Session.
-
-
On successful connection with the server, you will get a circular indicator, stating the connection, IF(spin == true) : connection success 🎈.
- The circular indicator states the connection is success
- The circular indicator states the connection is success
background image of the proxyrouter : Designed by upklyak / Freepik