{
    "mode": "perldoc",
    "parameter": "Net::Config",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AConfig/json",
    "generated": "2026-06-03T11:53:07Z",
    "synopsis": "use Net::Config qw(%NetConfig);",
    "sections": {
        "NAME": {
            "content": "Net::Config - Local configuration data for libnet\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Net::Config qw(%NetConfig);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"Net::Config\" holds configuration data for the modules in the libnet distribution. During\ninstallation you will be asked for these values.\n\nThe configuration data is held globally in \"/etc/perl/Net/libnet.cfg\", but a user may override\nany of these values by providing their own. This can be done by having a \".libnetrc\" file in\ntheir home directory. This file should return a reference to a HASH containing the keys\ndescribed below. For example\n\n# .libnetrc\n{\nnntphosts => [ \"mypreferredhost\" ],\nphhosts   => [ \"myphserver\" ],\n}\nEND\n",
            "subsections": [
                {
                    "name": "Class Methods",
                    "content": "\"Net::Config\" defines the following methods. They are methods as they are invoked as class\nmethods. This is because \"Net::Config\" inherits from \"Net::LocalCfg\" so you can override these\nmethods if you want.\n\n\"requiresfirewall($host)\"\nAttempts to determine if a given host is outside your firewall. Possible return values are.\n\n-1  Cannot lookup hostname\n0  Host is inside firewall (or there is no ftpfirewall entry)\n1  Host is outside the firewall\n\nThis is done by using hostname lookup and the \"localnetmask\" entry in the configuration\ndata.\n"
                },
                {
                    "name": "NetConfig Values",
                    "content": "nntphosts\nsnpphosts\npop3hosts\nsmtphosts\nphhosts\ndaytimehosts\ntimehosts\nEach is a reference to an array of hostnames (in order of preference), which should be used\nfor the given protocol\n\ninetdomain\nYour internet domain name\n\nftpfirewall\nIf you have an FTP proxy firewall (NOT an HTTP or SOCKS firewall) then this value should be\nset to the firewall hostname. If your firewall does not listen to port 21, then this value\nshould be set to \"hostname:port\" (eg \"hostname:99\")\n\nftpfirewalltype\nThere are many different ftp firewall products available. But unfortunately there is no\nstandard for how to traverse a firewall. The list below shows the sequence of commands that\nNet::FTP will use\n\nuser        Username for remote host\npass        Password for remote host\nfwuser      Username for firewall\nfwpass      Password for firewall\nremote.host The hostname of the remote ftp server\n\n0   There is no firewall\n\n1\nUSER user@remote.host\nPASS pass\n\n2\nUSER fwuser\nPASS fwpass\nUSER user@remote.host\nPASS pass\n\n3\nUSER fwuser\nPASS fwpass\nSITE remote.site\nUSER user\nPASS pass\n\n4\nUSER fwuser\nPASS fwpass\nOPEN remote.site\nUSER user\nPASS pass\n\n5\nUSER user@fwuser@remote.site\nPASS pass@fwpass\n\n6\nUSER fwuser@remote.site\nPASS fwpass\nUSER user\nPASS pass\n\n7\nUSER user@remote.host\nPASS pass\nAUTH fwuser\nRESP fwpass\n\nftpextpassive\nftpintpassive\nFTP servers can work in passive or active mode. Active mode is when you want to transfer\ndata you have to tell the server the address and port to connect to. Passive mode is when\nthe server provide the address and port and you establish the connection.\n\nWith some firewalls active mode does not work as the server cannot connect to your machine\n(because you are behind a firewall) and the firewall does not re-write the command. In this\ncase you should set \"ftpextpassive\" to a *true* value.\n\nSome servers are configured to only work in passive mode. If you have one of these you can\nforce \"Net::FTP\" to always transfer in passive mode; when not going via a firewall, by\nsetting \"ftpintpassive\" to a *true* value.\n\nlocalnetmask\nA reference to a list of netmask strings in the form \"134.99.4.0/24\". These are used by the\n\"requiresfirewall\" function to determine if a given host is inside or outside your\nfirewall.\n\nThe following entries are used during installation & testing on the libnet package\n\ntesthosts\nIf true then \"make test\" may attempt to connect to hosts given in the configuration.\n\ntestexists\nIf true then \"Configure\" will check each hostname given that it exists\n"
                }
            ]
        },
        "EXPORTS": {
            "content": "The following symbols are, or can be, exported by this module:\n\nDefault Exports\n%NetConfig.\n\nOptional Exports\n*None*.\n\nExport Tags\n*None*.\n",
            "subsections": []
        },
        "KNOWN BUGS": {
            "content": "*None*.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Graham Barr <gbarr@pobox.com <mailto:gbarr@pobox.com>>.\n\nSteve Hay <shay@cpan.org <mailto:shay@cpan.org>> is now maintaining libnet as of version\n1.2202.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (C) 2000 Graham Barr. All rights reserved.\n\nCopyright (C) 2013-2014, 2016, 2020 Steve Hay. All rights reserved.\n",
            "subsections": []
        },
        "LICENCE": {
            "content": "This module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself, i.e. under the terms of either the GNU General Public License or the Artistic\nLicense, as specified in the LICENCE file.\n",
            "subsections": []
        },
        "VERSION": {
            "content": "Version 3.13\n",
            "subsections": []
        },
        "DATE": {
            "content": "23 Dec 2020\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "See the Changes file.\n",
            "subsections": []
        }
    },
    "summary": "Net::Config - Local configuration data for libnet",
    "flags": [],
    "examples": [],
    "see_also": []
}