Questions tagged [proxy]

A proxy is a device or program that stands between two or more interconnected programs or devices. Reasons for a proxy include one or more connected parties only wanting the other to access specific data. A proxy provides a method for this.

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

Detecting the content type of a given http body/string

I am trying to detect the content/mime type of a given Buffer/string. In other words, I am trying to guess what on earth is a given string. My approach is somewhat brute-force: ...
Dimitrios Desyllas's user avatar
5 votes
3 answers
159 views

Socks4 Client/Server implementation

I implemented a basic Socks4 client and server which can handle CONNECT requests only right now also without identfication protocol support. I've tested it with a ...
mortytheshorty's user avatar
1 vote
0 answers
99 views

Rotating pool of proxies

It's a very simple class to get a different proxy each time it's called. I've done it because I was trying to use aiohttp_scraper and it didn't work so I have to make my own. This is just one of the ...
user avatar
2 votes
1 answer
211 views

A proxy class as a generic replacement for getters and setters v2

Have you ever written proxy objects, instead of using a setter and a getter method? In that case, I'm interested in your opinion on the following design for a templated proxy. This is a second version,...
einpoklum's user avatar
  • 1,995
1 vote
1 answer
464 views

Parse proxy strings to array of objects

The goal of this module is to take in a string (user input, someone copy and pasting a large list of proxies) and parse it into an array of objects. I appreciate any and all feedback, but I'm ...
DevHigley's user avatar
2 votes
1 answer
436 views

Universal class for proxifying poplib, imaplib and smtplib. Lame inheritance or mock or something else?

This is wrapper for POP3, POP3_SSL, IMAP4, IMAP4_SSL, <...
Olvin Roght's user avatar
3 votes
0 answers
85 views

Automatic service logging

GitHub Here is a Castle.Core based service interface decorator providing automatic logging through the ambient logging context. Logging context should be ...
Dmitry Nogin's user avatar
  • 6,133
6 votes
2 answers
1k views

A proxy class as a generic replacement for getters and setters

(There is now a 2nd version of this code) Have you ever written proxy objects, instead of using a setter and a getter method? In that case, I'm interested in your opinion on the following design for a ...
einpoklum's user avatar
  • 1,995
1 vote
0 answers
120 views

JavaScript Proxy: set DOM Element styles by chaining CSS setters

First time creating my own Proxy handler, instead of copy pasting code. Goal is to chain CSS definitions: style(element).color("red").background("green") and allow whole CSS ...
Danny '365CSI' Engelman's user avatar
1 vote
2 answers
79 views

Use proxy for jQuery-like DOM extensions

I have cleared all my scripting from the use of JQuery, but sometimes I miss a few handy extensions. Now I'm playing with the idea to "extend" ...
KooiInc's user avatar
  • 577
2 votes
0 answers
48 views

Proxy server performance improvements?

fairly new to playing around with proxy servers. Wrote a really simple one with Express to help keep some API keys secret so that my front-end app can query the GitHub API. Definitely feels a bit ...
Anthony's user avatar
  • 191
5 votes
1 answer
277 views

Testable REST API Client

GitHub and NuGet Allows to invoke public/private REST API just by defining an interface. 200 lines of C# in total. Demo Sample API is publicly available at http://jsonplaceholder.typicode.com: <...
Dmitry Nogin's user avatar
  • 6,133
5 votes
1 answer
143 views

Strictly typed dynamic proxy to call dynamic object

GitHub and NuGet I would like to use DynamicObject derived types to execute REST API/NodeJS module calls. It would also help to capture API shape in a strictly typed manner, so here comes an ...
Dmitry Nogin's user avatar
  • 6,133
3 votes
1 answer
401 views

Sticking to a working proxy generated by a rotating proxy script

I've created a script in python to make proxied requests by picking working proxies from a list of proxies scraped from a free proxy site. The bot traverses few links to parse the urls of the ...
MITHU's user avatar
  • 535
4 votes
0 answers
75 views

JavaScript attempt at an aspect oriented logger using proxies and reflect

I've been playing around with AOP in JavaScript to create a Logger that I can attach to classes and output what is going on (mainly instantiation, calling of functions and the results from functions). ...
Jarede's user avatar
  • 309
2 votes
1 answer
5k views

Web-scraping through a rotating proxy script

I've created a script in python which is able to parse proxies (supposed to support "https") from a website. Then the script will use those proxies randomly to parse the title of different coffe shops ...
SIM's user avatar
  • 2,471
6 votes
1 answer
4k views

Using rotation of proxies within a Python script

I've written a script in Python using rotation of proxies which is able to fetch different titles from a website traversing different pages. I've tried to write this scraper in such a way so that it ...
MITHU's user avatar
  • 535
6 votes
3 answers
2k views

Creating HTTP proxies for services

I have a HTTP client factory that creates a separate HTTP proxy instance for each of my services - which are in the cloud. The factory creates each instance on the basis of an interface which the ...
Alternatex's user avatar
4 votes
1 answer
2k views

Node.js/Express middleware to relay requests to various APIs

I am creating a nodejs middleware server that will handle api transactions from a frontend and relay them to various api's (internal and external). The primary goal is to hide api keys from the ...
Joe Riggs's user avatar
0 votes
1 answer
99 views

Different implementation of an Interface along with additional parameters

I am designing an interface for 2 distinct implementations as follows: Perform operations without client credentials ( for my local applications) Perform operations using security token. (for web ...
Anupam Singh's user avatar
2 votes
1 answer
276 views

Scraping different categories using different links through proxy

I've written a script in python to scrape name, review_star and review_count by going through thousands of links (to different products) stored in a csv file using reverse search. As those links are ...
SIM's user avatar
  • 2,471
2 votes
0 answers
1k views

Java Socket Proxy

I've been messing around with protocol handlers in Java, going so far as to write my own using a custom URLStreamHandler and ...
ndm13's user avatar
  • 718
2 votes
1 answer
2k views

Web scraping using proxy in vba

I've written a script in vba to parse movie names and year from a torrent site. The script is doing just awesome. Although the scraper is leaving no room for complaint, I'm still dubious about how the ...
SIM's user avatar
  • 2,471
7 votes
2 answers
1k views

Implementing a copy on write String class using reference counting in C++

I have tried to implement a copy on write string class with value semantics and reference counting. I wanted to support indexing, so I have overloaded the operator[] and to differentiate between the ...
sunil pai's user avatar
4 votes
0 answers
474 views

PowerShell Export-CSV with Cultural Awareness

I recently had a requirement to export data to CSV in a different culture & hit an issue (see https://stackoverflow.com/a/40871162/361842). Here's my workaround: ...
JohnLBevan's user avatar
  • 1,409
3 votes
0 answers
135 views

msysGit to Unix sockets

I wrote this small script to help porting msysGit sockets to WSL ("Bash for Windows"). I'm not a big Python programmer so any feedback would be well appreciated. By the way, I made it a public Gist ...
Florin Asăvoaie's user avatar
2 votes
1 answer
1k views

Handling errors in a Python UDP proxy [closed]

The following (stripped) program receives UDP packets on port 5000 and forwards them to port 5001. It may throw socket errors on startup (e.g.: if the port is already in use), but I am not too worried ...
marcv81's user avatar
  • 183
2 votes
0 answers
1k views

Google Searching Bot with Proxy support

I have been asked by a client to program a bot which searches Google and will show how many no of results I get. Note: I know about Google Custom Search API and it will not produce the exact output ...
VISWESWARAN NAGASIVAM's user avatar
7 votes
1 answer
2k views

JSON REST client proxy generator

Trying to create something really lightweight. Sources are on GitHub. To create a proxy we need to define an interface first, e.g.: ...
Dmitry Nogin's user avatar
  • 6,133
2 votes
0 answers
2k views

Simple TCP proxy

EDIT The previous proxy code, after thorough testing, had issues with the stream_copy_to_stream() when sending from $client ...
maff1989's user avatar
  • 131
3 votes
0 answers
1k views

Workaround proxy to be able to call 32-bit dll

I had a problem that I posted on StackOverflow about that I could not connect to windows phone 7 from a 64-bit application. I got one response that said I should try to create a WCF Service over named ...
Happlo's user avatar
  • 131
2 votes
0 answers
187 views

REST proxy in Meteor

I built a simple proxy using Meteor and its Iron Router. It currently fails at passing through other than 200 or 500 status codes, which I guess suffices. Is this ...
Cees Timmerman's user avatar
3 votes
1 answer
6k views

Getting HTTP Status Code

I have code that take in a URL (via URL or String) and returns the status code. I am new to web development, so it is very possible that I may be taking a poor approach at this. One thing I don't ...
Evorlor's user avatar
  • 524
2 votes
0 answers
189 views

Proxy pattern for supporting '... = ob[idx]->someObjMember = ...' type access

I've finally got a working Proxy pattern. The original task is presented here. My test case is on coliru. It appears to flow through the correct pathways, however I am grateful for feedback and ...
P i's user avatar
  • 629
12 votes
1 answer
541 views

Use of Mediator Pattern or Proxy Pattern for a game

When a Wizard casts the Monster Summoning spell, all of the summoned monsters shall follow his command. Should the Wizard interact with his summoned monsters ...
prestokeys's user avatar
  • 1,351
4 votes
0 answers
1k views

Python proxy class

I've coded my own proxy class in python. The aim is to have a different type() but otherwise behave as identical to the underlying object as possible. I'm wondering ...
simonzack's user avatar
  • 219
2 votes
1 answer
5k views

Make a “Web-Proxy” - step-by-step

My problem with links is solved. Text challenge is to copy pictures on remote page to my own host, then replace the links in source code. Any idea? I started creating a web proxy. I decided to ...
padfoot's user avatar
  • 21
7 votes
2 answers
3k views

Proxy using socket, doubts on multithreading and connection closing

I'm trying to make a simple proxy server in Python using the socket library, mostly to understand how it works. I'm a noob both at programming and networking, so please be nice if my questions are ...
AX466's user avatar
  • 71
6 votes
1 answer
3k views

HTTP Get with proxy

The code is implemented to perform HTTP get with HTTP proxy. Future object is adopted to avoid blocking in current thread. I'm not quite sure about the usage of HTTP connection pooling manager and ...
upton's user avatar
  • 307
8 votes
1 answer
743 views

A program to proxy MDNS requests to the DNS server

I wrote a program to proxy MDNS requests in a local network to the DNS server. This is useful because in some private networks, host names ending in ".local" are configured in the DNS server. But "....
user28062's user avatar
3 votes
1 answer
734 views

Creating Proxy classes for immutable objects

As a bit of a learning project, I decided to take the concept of proxying objects a bit further and extend it to creating proxy classes which create proxy'd objects. I originally found the idea of ...
Snakes and Coffee's user avatar
2 votes
1 answer
280 views

Generated code proxy

In my library Transfuse I use a code generator to build a handful of classes that look up resources. Each of these look up classes are proxied by a static utility class so they may be referenced ...
John Ericksen's user avatar
5 votes
2 answers
10k views

Casting to less generic types

The source code, or rather the concept I'd like to get reviewed is what now allows me to do the following during reflection: ...
Steven Jeuris's user avatar
11 votes
3 answers
6k views

Ruby Koans Proxy Project

I've just finished the Ruby Koans and one of the last projects was creating a Proxy class that sends methods to another class. I was wondering whether you would change anything about my solution (if ...
Joel C's user avatar
  • 111
4 votes
1 answer
576 views

Refactor for using ChannelFactory

I use VS 2008 and .NET 3.5 I have this code using CustomChannelFactory and Proxy ServiceReference. I would like refactor using lambdas, Action, ... any suggestions ? ...
Kiquenet's user avatar
  • 261
2 votes
1 answer
2k views

Hibernate proxy converter for GWT

Here's a class that converts Hibernate proxies to normal classes. This is useful with GWT for example, when sending objects loaded from database to the GWT client. Please review it. ...
Andrey's user avatar
  • 121
11 votes
3 answers
4k views

Windows service for monitoring network interface changes

I'm currently working on several projects for my company to help reduce the amount of calls we have to deal with so we can focus on higher priority task, such as server resource reduction, etc. The ...
RobertPitt's user avatar
  • 1,196