Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6168615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:43:06+00:00 2026-05-23T22:43:06+00:00

I have several WHOIS servers for which I want to have a single proxy.

  • 0

I have several WHOIS servers for which I want to have a single proxy. The proxy should forward requests to appropriate servers based on the data in the query. How to approach this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:43:07+00:00Added an answer on May 23, 2026 at 10:43 pm

    Step 1 read the RFC for WHOIS
    Step 2 implement a mock server with Net::Server
    Step 3 implement the proxy using your mock server and Net::Whois::Proxy or some other WHOIS module

    A quick scan of the RFC seems to say that it is just a simple text based protocol that expects one CRLF terminated line and then sends a blob of CRLF terminate lines and closes the socket.

    Yep, it really looks that simple, given this code

    #!/usr/bin/perl
    
    {
        package Whois;
        use strict;
        use warnings;
    
        use parent 'Net::Server';
    
        sub process_request {
            my $request = <>;
            print "you sent me $request";
        }
    
    }
    
    Whois->run;
    

    you can say

    whois -h localhost -p 20203 foo.com
    

    and get back

    you sent me foo.com
    

    Given the "high-load" tag, you will probably want to switch over to Net::Server::PreForkSimple personality when you are done with testing.

    And just because I was bored:

    #!/usr/bin/perl
    
    package Whois {
        use strict;
        use warnings;
    
        use parent 'Net::Server::PreFork';
    
        use Net::Whois::Raw;
    
        my %handler = (
            org => "whois.publicinterestregistry.net",
        );
    
        sub process_request {
            (my $request = <>) =~ s/[.]([^.]+)\x{0d}\x{0a}/.$1/;
    
            print exists $handler{$1} ?
                whois $request, $handler{$1} :
                "I don't know where to look for $request\r\n";
        }
    
    }
    
    Whois->run(
        user              => "nobody",
        group             => "nobody",
        port              => 43,
        min_servers       => 1,      #min number of children
        max_servers       => 10,     #max number of children
        min_spare_servers => 1,      #fork if we don't have this many waiting
        max_spare_servers => 5,      #kill if we have this many waiting
        max_requests      => 10_000, #num of requests before killing a child    
    );
    

    which when I run

    sudo perl whois.pl
    

    and then

    whois -h localhost foo.org
    

    gives us

    NOTICE: Access to .ORG WHOIS information is provided to assist persons in
    determining the contents of a domain name registration record in the Public Interest Registry
    registry database. The data in this record is provided by Public Interest Registry
    for informational purposes only, and Public Interest Registry does not guarantee its
    accuracy.  This service is intended only for query-based access.  You agree
    that you will use this data only for lawful purposes and that, under no
    circumstances will you use this data to: (a) allow, enable, or otherwise
    support the transmission by e-mail, telephone, or facsimile of mass
    unsolicited, commercial advertising or solicitations to entities other than
    the data recipient's own existing customers; or (b) enable high volume,
    automated, electronic processes that send queries or data to the systems of
    Registry Operator or any ICANN-Accredited Registrar, except as reasonably
    necessary to register domain names or modify existing registrations.  All
    rights reserved. Public Interest Registry reserves the right to modify these terms at any
    time. By submitting this query, you agree to abide by this policy.
    
    Domain ID:D1608104-LROR
    Domain Name:FOO.ORG
    Created On:10-Jan-1995 05:00:00 UTC
    Last Updated On:07-Mar-2011 00:26:43 UTC
    Expiration Date:09-Jan-2012 05:00:00 UTC
    Sponsoring Registrar:Fabulous.com Pty Ltd. (R133-LROR)
    Status:CLIENT DELETE PROHIBITED
    Status:CLIENT TRANSFER PROHIBITED
    Registrant ID:fabwpp-000700385
    Registrant Name:Domain Hostmaster, CustomerID : 85519846801225
    Registrant Organization:Whois Privacy Services Pty Ltd
    Registrant Street1:PO Box 923
    Registrant Street2:
    Registrant Street3:
    Registrant City:Fortitude Valley
    Registrant State/Province:QLD
    Registrant Postal Code:4006
    Registrant Country:AU
    Registrant Phone:+61.730070090
    Registrant Phone Ext.:
    Registrant FAX:+61.730070091
    Registrant FAX Ext.:
    Registrant Email:85519846801225-959797@whoisprivacyservices.com.au
    Admin ID:fabwpp-000700385
    Admin Name:Domain Hostmaster, CustomerID : 85519846801225
    Admin Organization:Whois Privacy Services Pty Ltd
    Admin Street1:PO Box 923
    Admin Street2:
    Admin Street3:
    Admin City:Fortitude Valley
    Admin State/Province:QLD
    Admin Postal Code:4006
    Admin Country:AU
    Admin Phone:+61.730070090
    Admin Phone Ext.:
    Admin FAX:+61.730070091
    Admin FAX Ext.:
    Admin Email:85519846801225-959797@whoisprivacyservices.com.au
    Tech ID:fabwpp-000700385
    Tech Name:Domain Hostmaster, CustomerID : 85519846801225
    Tech Organization:Whois Privacy Services Pty Ltd
    Tech Street1:PO Box 923
    Tech Street2:
    Tech Street3:
    Tech City:Fortitude Valley
    Tech State/Province:QLD
    Tech Postal Code:4006
    Tech Country:AU
    Tech Phone:+61.730070090
    Tech Phone Ext.:
    Tech FAX:+61.730070091
    Tech FAX Ext.:
    Tech Email:85519846801225-959797@whoisprivacyservices.com.au
    Name Server:NS1.HITFARM.COM
    Name Server:NS2.HITFARM.COM
    Name Server:
    Name Server:
    Name Server:
    Name Server:
    Name Server:
    Name Server:
    Name Server:
    Name Server:
    Name Server:
    Name Server:
    Name Server:
    DNSSEC:Unsigned
    
    
    whois.publicinterestregistry.net
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an upcoming project coming up in which I want to dedicate several
I have several xml files with different node structure. I want to extract xml
I have several Select which depend on each other if I select a value
I have several resource dictionaries with theme-related data, where I declared styles for particular
I have several hundred products in my Magento store, all of which have a
I have several JPanel s with which contain JLabel s and JTextField s for
I have several div's using an id obtained from a query, this id is
I have several HTML elements (buttons) that fire the same JQuery AJAX request. When
I have several Delphi programs that maintain connections to a database (some Oracle, some
I have several different numbers in a group that range in sizes and would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.