From faf837932b0c36c6dc653d239e5d34745ad92500 Mon Sep 17 00:00:00 2001 From: Arunim Shukla <54760103+arunimshukla@users.noreply.github.com> Date: Mon, 20 Jul 2026 16:51:09 +0530 Subject: [PATCH 1/3] Update ruby.mdx Replace Puppeteer code with Ruby sample. Signed-off-by: Arunim Shukla <54760103+arunimshukla@users.noreply.github.com> --- residential/samples/ruby.mdx | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/residential/samples/ruby.mdx b/residential/samples/ruby.mdx index cec395c..ee0b654 100644 --- a/residential/samples/ruby.mdx +++ b/residential/samples/ruby.mdx @@ -3,22 +3,21 @@ title: 'Ruby' description: 'Ruby’s standard HTTP library doesn’t seem to support HTTPS proxy connections, so connect to the [Massive Network’s HTTP port](/authentication#http) with Ruby:' --- -```javascript -#!/usr/bin/env node -const puppeteer = require('puppeteer'); +```ruby +#!/usr/bin/env ruby +require 'net/http' +require 'uri' -(async () => { - const browser = await puppeteer.launch({ - args: ['--proxy-server=https://network.joinmassive.com:65535'] - }); - const page = (await browser.pages())[0]; +username = '{PROXY_USERNAME}' +password = '{API_KEY}' +url = URI('https://cloudflare.com/cdn-cgi/trace') # Insert your target URL here +host = 'network.joinmassive.com' +port = 65534 - await page.authenticate({ - username: '{PROXY_USERNAME}, - password: '{API_KEY}' - }); - await page.goto('https://cloudflare.com/cdn-cgi/trace'); // Insert your target URL here - console.log(await page.content()); - browser.close(); -})(); -``` \ No newline at end of file +proxy = Net::HTTP.Proxy(host, port, username, password) +response = proxy.start(url.host, url.port, use_ssl: url.scheme == 'https') do |http| + http.request(Net::HTTP::Get.new(url)) + end + +puts response.body +``` From 4dbce81dd5de63ca5e21c9b8b0d45ac0ed52d10f Mon Sep 17 00:00:00 2001 From: Arunim Shukla <54760103+arunimshukla@users.noreply.github.com> Date: Mon, 20 Jul 2026 16:58:43 +0530 Subject: [PATCH 2/3] Update puppeteer.mdx Fix unterminated string in Puppeteer sample Signed-off-by: Arunim Shukla <54760103+arunimshukla@users.noreply.github.com> --- residential/samples/puppeteer.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/residential/samples/puppeteer.mdx b/residential/samples/puppeteer.mdx index b3b1cfd..2f0436c 100644 --- a/residential/samples/puppeteer.mdx +++ b/residential/samples/puppeteer.mdx @@ -14,11 +14,11 @@ const puppeteer = require('puppeteer'); const page = (await browser.pages())[0]; await page.authenticate({ - username: '{PROXY_USERNAME}, + username: '{PROXY_USERNAME}', password: '{API_KEY}' }); await page.goto('https://cloudflare.com/cdn-cgi/trace'); // Insert your target URL here console.log(await page.content()); browser.close(); })(); -``` \ No newline at end of file +``` From 5ec2222ba8c54c1a57027525764660bdf68ea246 Mon Sep 17 00:00:00 2001 From: Arunim Shukla <54760103+arunimshukla@users.noreply.github.com> Date: Mon, 20 Jul 2026 16:59:55 +0530 Subject: [PATCH 3/3] Update python.mdx Signed-off-by: Arunim Shukla <54760103+arunimshukla@users.noreply.github.com> --- residential/samples/python.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/residential/samples/python.mdx b/residential/samples/python.mdx index 772665c..bd63092 100644 --- a/residential/samples/python.mdx +++ b/residential/samples/python.mdx @@ -3,7 +3,7 @@ title: '(Vanilla) Python' description: 'To connect to the Massive Network from Python, include your encoded credentials in the proxy address (this usage doesn’t risk leaking your API token to a shared history file per the caveat for Curl):' --- -```javascript +```python #!/usr/bin/env python3 import requests import urllib @@ -17,4 +17,4 @@ proxy = f'https://{username}:{password}@{host}:{port}' response = requests.get(url, proxies={'http': proxy, 'https': proxy}) print(response.content) -``` \ No newline at end of file +```