Switch from 'host name' to 'hostname'

This commit is contained in:
idk
2021-02-01 23:12:49 -05:00
parent a4777f3e5d
commit fdb4ec7d7c
41 changed files with 111 additions and 111 deletions

View File

@@ -98,7 +98,7 @@ import net.metanotion.util.skiplist.SkipList;
*
* </pre>
*
* All host names are converted to lower case.
* All hostnames are converted to lower case.
*
* @since 0.8.7, moved from core to addressbook in 0.9.31
*/

View File

@@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletRequest;
* This class is immutable.
*
* <ul>
* <li>The client's host name.
* <li>The client's hostname.
* <li>The client's IP address.
* <li>Whether the request / notification was transmitted securely (e.g.
* via HTTPS).
@@ -122,7 +122,7 @@ public class MessageContext {
/**
* Creates a new JSON-RPC 2.0 request / notification context.
*
* @param clientHostName The client host name, {@code null} if
* @param clientHostName The client hostname, {@code null} if
* unknown.
* @param clientInetAddress The client IP address, {@code null} if
* unknown.
@@ -150,7 +150,7 @@ public class MessageContext {
/**
* Creates a new JSON-RPC 2.0 request / notification context.
*
* @param clientHostName The client host name, {@code null} if
* @param clientHostName The client hostname, {@code null} if
* unknown.
* @param clientInetAddress The client IP address, {@code null} if
* unknown.
@@ -181,7 +181,7 @@ public class MessageContext {
* Creates a new JSON-RPC 2.0 request / notification context. No
* authenticated client principal is specified.
*
* @param clientHostName The client host name, {@code null} if
* @param clientHostName The client hostname, {@code null} if
* unknown.
* @param clientInetAddress The client IP address, {@code null} if
* unknown.
@@ -202,7 +202,7 @@ public class MessageContext {
* an insecure transport (plain HTTP) and no authenticated client
* principal.
*
* @param clientHostName The client host name, {@code null} if
* @param clientHostName The client hostname, {@code null} if
* unknown.
* @param clientInetAddress The client IP address, {@code null} if
* unknown.
@@ -219,7 +219,7 @@ public class MessageContext {
/**
* Creates a new JSON-RPC 2.0 request / notification context. Indicates
* an insecure transport (plain HTTP) and no authenticated client
* principal. Not client host name / IP is specified.
* principal. Not client hostname / IP is specified.
*/
public MessageContext() {
@@ -315,10 +315,10 @@ public class MessageContext {
/**
* Gets the host name of the client that sent the request /
* Gets the hostname of the client that sent the request /
* notification.
*
* @return The client host name, {@code null} if unknown.
* @return The client hostname, {@code null} if unknown.
*/
public String getClientHostName() {

View File

@@ -1765,7 +1765,7 @@ class PeerCoordinator implements PeerListener
/**
* Ban a web peer for this torrent, for while or permanently.
* @param host the host name
* @param host the hostname
* @since 0.9.49
*/
public synchronized void banWebPeer(String host, boolean isPermanent) {
@@ -1785,7 +1785,7 @@ class PeerCoordinator implements PeerListener
/**
* Is a web peer banned?
* @param host the host name
* @param host the hostname
* @since 0.9.49
*/
public synchronized boolean isWebPeerBanned(String host) {

View File

@@ -174,8 +174,8 @@ public class SnarkManager implements CompleteListener, ClientApp {
* "name", "announceURL=websiteURL" pairs
* '=' in announceURL must be escaped as &#44;
*
* Please use host name, not b32 or full dest, in announce URL. Ensure in default hosts.txt.
* Please use host name, not b32 or full dest, in website URL. Ensure in default hosts.txt.
* Please use hostname, not b32 or full dest, in announce URL. Ensure in default hosts.txt.
* Please use hostname, not b32 or full dest, in website URL. Ensure in default hosts.txt.
*/
private static final String DEFAULT_TRACKERS[] = {
// "Postman", "http://YRgrgTLGnbTq2aZOZDJQ~o6Uk5k6TK-OZtx0St9pb0G-5EGYURZioxqYG8AQt~LgyyI~NCj6aYWpPO-150RcEvsfgXLR~CxkkZcVpgt6pns8SRc3Bi-QSAkXpJtloapRGcQfzTtwllokbdC-aMGpeDOjYLd8b5V9Im8wdCHYy7LRFxhEtGb~RL55DA8aYOgEXcTpr6RPPywbV~Qf3q5UK55el6Kex-6VCxreUnPEe4hmTAbqZNR7Fm0hpCiHKGoToRcygafpFqDw5frLXToYiqs9d4liyVB-BcOb0ihORbo0nS3CLmAwZGvdAP8BZ7cIYE3Z9IU9D1G8JCMxWarfKX1pix~6pIA-sp1gKlL1HhYhPMxwyxvuSqx34o3BqU7vdTYwWiLpGM~zU1~j9rHL7x60pVuYaXcFQDR4-QVy26b6Pt6BlAZoFmHhPcAuWfu-SFhjyZYsqzmEmHeYdAwa~HojSbofg0TMUgESRXMw6YThK1KXWeeJVeztGTz25sL8AAAA.i2p/announce.php=http://tracker.postman.i2p/"
@@ -212,7 +212,7 @@ public class SnarkManager implements CompleteListener, ClientApp {
public static final Set<String> DEFAULT_TRACKER_ANNOUNCES;
/** host names for config form */
/** hostnames for config form */
static final Set<String> KNOWN_OPENTRACKERS = new HashSet<String>(Arrays.asList(new String[] {
"tracker.welterde.i2p", "cfmqlafjfmgkzbt4r3jsfyhgsr5abgxryl6fnz3d3y5a365di5aa.b32.i2p",
"opentracker.dg2.i2p", "w7tpbzncbcocrqtwwm3nezhnnsw4ozadvi2hmvzdhrqzfxfum7wa.b32.i2p",

View File

@@ -2229,7 +2229,7 @@ public class I2PSnarkServlet extends BasicServlet {
}
/**
* Full anchor to home page or details page with shortened host name as anchor text
* Full anchor to home page or details page with shortened hostname as anchor text
* @return string, non-null
* @since 0.9.5
*/

View File

@@ -205,7 +205,7 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
String hostLowerCase = host.toLowerCase(Locale.US);
if (hostLowerCase.endsWith(".i2p")) {
// Destination gets the host name
// Destination gets the hostname
destination = host;
} else if (host.contains(".") || host.startsWith("[")) {
if (Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_USE_OUTPROXY_PLUGIN, "true"))) {

View File

@@ -64,7 +64,7 @@ import net.i2p.util.PortMapper;
* resolve correctly, cookies won't work, etc.
*
* Note that http://$b64key/... and http://$b64key.i2p/... are NOT supported, as
* a b64 key may contain '=' and '~', both of which are illegal host name characters.
* a b64 key may contain '=' and '~', both of which are illegal hostname characters.
* Rewrite as http://i2p/$b64key/...
*
* If the $site resolves with the I2P naming service, then it is directed towards
@@ -76,7 +76,7 @@ import net.i2p.util.PortMapper;
public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runnable {
/**
* Map of host name to base64 destination for destinations collected
* Map of hostname to base64 destination for destinations collected
* via address helper links
*/
private final ConcurrentHashMap<String, String> addressHelpers = new ConcurrentHashMap<String, String>(8);
@@ -172,8 +172,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
"Proxy-Connection: close\r\n"+
"\r\n" +
"<html><body><H1>New Host Name with Address Helper</H1>" +
"The address helper link you followed is for a new host name that is not in your address book. " +
"You may either save the destination for this host name to your address book, or remember it only until your router restarts. " +
"The address helper link you followed is for a new hostname that is not in your address book. " +
"You may either save the destination for this hostname to your address book, or remember it only until your router restarts. " +
"If you save it to your address book, you will not see this message again. " +
"If you do not wish to visit this host, click the \"back\" button on your browser.";
@@ -573,7 +573,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
int port = requestURI.getPort();
// Go through the various types of host names, set
// Go through the various types of hostnames, set
// the host and destination variables accordingly,
// and transform the first line.
// For all i2p network hosts, ensure that the host is a
@@ -622,7 +622,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
break;
}
} else if(hostLowerCase.endsWith(".i2p")) {
// Destination gets the host name
// Destination gets the hostname
destination = host;
// Host becomes the destination's "{b32}.b32.i2p" string, or "i2p" on lookup failure
host = getHostName(destination);
@@ -911,7 +911,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
// ignore
}
return;
} // end host name processing
} // end hostname processing
boolean isValid = usingInternalOutproxy || usingWWWProxy ||
usingInternalServer || isSupportedAddress(host, protocol);
@@ -1006,7 +1006,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
line = null;
continue; // completely strip the line if everything doesn't match
}
// Strip to a relative URI, to hide the original host name
// Strip to a relative URI, to hide the original hostname
StringBuilder buf = new StringBuilder();
buf.append("Referer: ");
String refererPath = refererURI.getRawPath();

View File

@@ -762,7 +762,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
private final boolean _isSSL;
/**
* @param target the URI for an HTTP request, or the host name for CONNECT
* @param target the URI for an HTTP request, or the hostname for CONNECT
*/
public OnTimeout(Socket s, OutputStream out, String target, boolean usingProxy, String wwwProxy, long id) {
_socket = s;
@@ -776,7 +776,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
}
/**
* @param target the URI for an HTTP request, or the host name for CONNECT
* @param target the URI for an HTTP request, or the hostname for CONNECT
* @param targetHost if non-null, call noteProxyResult() with this as host
* @param isSSL to pass to noteProxyResult(). FALSE for ConnectClient.
* @since 0.9.39
@@ -981,7 +981,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
out.write(jurl);
out.write(uri);
out.write("\">");
// Translators: parameter is a host name
// Translators: parameter is a hostname
out.write(_t("{0} jump service", jumphost));
out.write("</a>\n");
}

View File

@@ -269,7 +269,7 @@ public class I2Ping extends I2PTunnelClientBase {
/**
* As of 0.9.11, does NOT start itself.
* Caller must call start()
* @param dest b64 or b32 or host name
* @param dest b64 or b32 or hostname
*/
public PingHandler(String dest, int count, int fromPort, int toPort,
long timeout, boolean countPings, boolean report) {
@@ -335,7 +335,7 @@ public class I2Ping extends I2PTunnelClientBase {
}
/**
* @param name b64 or b32 or host name
* @param name b64 or b32 or hostname
* @since 0.9.11
*/
private Destination lookup(String name) {

View File

@@ -137,7 +137,7 @@ public class SSLClientUtil {
logAlways("Created self-signed certificate for " + cname + " in keystore: " + ks.getAbsolutePath() + "\n" +
"The certificate was generated randomly.\n" +
"Unless you have changed the default settings, the certificate is not associated with your " +
"IP address, host name, router identity, or destination keys.");
"IP address, hostname, router identity, or destination keys.");
} else {
error("Failed to create I2PTunnel SSL keystore.\n" +
"If you create the keystore manually, you must add " + optPfx + PROP_KEYSTORE_PASSWORD + " and " + optPfx + PROP_KEY_PASSWORD +

View File

@@ -189,7 +189,7 @@ class SOCKS4aServer extends SOCKSServer {
setupServer();
if (connHostName == null) {
_log.error("BUG: destination host name has not been initialized!");
_log.error("BUG: destination hostname has not been initialized!");
throw new SOCKSException("BUG! See the logs!");
}
if (connPort == 0) {

View File

@@ -348,7 +348,7 @@ class SOCKS5Server extends SOCKSServer {
setupServer();
if (connHostName == null) {
_log.error("BUG: destination host name has not been initialized!");
_log.error("BUG: destination hostname has not been initialized!");
throw new SOCKSException("BUG! See the logs!");
}
if (connPort == 0) {

View File

@@ -112,9 +112,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
%><tr><td class="infohelp"><%=intl._t("Local destination is not available. Start the tunnel.")%></td></tr><%
} else if (name == null || name.equals("") || name.contains(" ") || !name.endsWith(".i2p")) {
if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) {
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name (or website name) to a valid host name ending in '.i2p'")%></td></tr><%
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name (or website name) to a valid hostname ending in '.i2p'")%></td></tr><%
} else {
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name to a valid host name ending in '.i2p'")%></td></tr><%
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name to a valid hostname ending in '.i2p'")%></td></tr><%
}
} else {
SigningPrivateKey spk = editBean.getSigningPrivateKey(curTunnel);
@@ -208,7 +208,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<%
} else {
%><tr><td class="infohelp"><%=intl._t("This tunnel must be configured with the new host name.")%>
%><tr><td class="infohelp"><%=intl._t("This tunnel must be configured with the new hostname.")%>
&nbsp;<%=intl._t("Enter old hostname below.")%></td></tr>
<%
}
@@ -240,7 +240,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
</tr>
<%
} else {
%><tr> <td class="infohelp"><%=intl._t("This tunnel must be configured with the new host name.")%>
%><tr> <td class="infohelp"><%=intl._t("This tunnel must be configured with the new hostname.")%>
&nbsp;<%=intl._t("Enter old hostname below.")%></td></tr>
<%
}

View File

@@ -500,9 +500,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
%><tr><td class="infohelp"><%=intl._t("Local destination is not available. Start the tunnel.")%></td></tr><%
} else if (name == null || name.equals("") || name.contains(" ") || !name.endsWith(".i2p")) {
if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) {
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name (or website name) to a valid host name ending in '.i2p'")%></td></tr><%
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name (or website name) to a valid hostname ending in '.i2p'")%></td></tr><%
} else {
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name to a valid host name ending in '.i2p'")%></td></tr><%
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name to a valid hostname ending in '.i2p'")%></td></tr><%
}
} else {
valid = true;

View File

@@ -1220,7 +1220,7 @@ public class Tcpbw100 extends JApplet implements ActionListener {
if ((sName = getParameter(NDTConstants.TARGET1)) == null) {
throw new IllegalArgumentException("U parameter Required:");
}
// host name
// hostname
if ((sHost = getParameter(NDTConstants.TARGET2)) == null) {
throw new IllegalArgumentException("H parameter Required:");
}

View File

@@ -953,7 +953,7 @@ public class RouterConsoleRunner implements RouterApp {
System.err.println("Created self-signed certificate for " + cname + " in keystore: " + ks.getAbsolutePath() + "\n" +
"The certificate was generated randomly.\n" +
"Unless you have changed the default settings, the certificate is not associated with your " +
"IP address, host name, router identity, or destination keys.");
"IP address, hostname, router identity, or destination keys.");
} else {
System.err.println("Failed to create console SSL keystore.\n" +
"This is for the Sun/Oracle keytool, others may be incompatible.\n" +

View File

@@ -84,7 +84,7 @@ public class ConfigKeyringHandler extends FormHandler {
spk = bdin.getUnblindedPubKey();
}
if (spk == null) {
addFormError(_t("Requires host name, destination, or blinded Base32"));
addFormError(_t("Requires hostname, destination, or blinded Base32"));
return;
}
// from BlindCache

View File

@@ -178,7 +178,7 @@ public class ConfigNetHandler extends FormHandler {
String oldUdp = _context.getProperty(UDPTransport.PROP_SOURCES,
_context.router().isHidden() ? "hidden" : UDPTransport.DEFAULT_SOURCES);
String oldUHost = _context.getProperty(UDPTransport.PROP_EXTERNAL_HOST, "");
// force change to fixed if user enters a host name/IP
// force change to fixed if user enters a hostname/IP
if (_udpHost1 != null && _udpHost1.length() > 0)
_udpAutoIP = "fixed";
if (_udpAutoIP != null) {

View File

@@ -247,7 +247,7 @@ public class ConfigNetHelper extends HelperBase {
}
if (!addrs.isEmpty()) {
buf.append("\n<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
.append(_t("Add host name or IP"))
.append(_t("Add hostname or IP"))
.append(": ");
}
buf.append("<input name=\"udpHost1\" type=\"text\" size=\"16\" >");

View File

@@ -380,7 +380,7 @@ public class NetDbHelper extends FormHandler {
"<tr><td>Encryption Type:</td><td><input type=\"text\" name=\"etype\"></td><td></td></tr>\n" +
"<tr><td>Router Family:</td><td><input type=\"text\" name=\"fam\"></td><td></td></tr>\n" +
"<tr><td>Hash Prefix:</td><td><input type=\"text\" name=\"r\"></td><td></td></tr>\n" +
"<tr><td>IP or Hostname:</td><td><input type=\"text\" name=\"ip\"></td><td>host name, IPv4, or IPv6, /24,/16,/8 suffixes optional for IPv4, prefix ok for IPv6</td></tr>\n" +
"<tr><td>IP or Hostname:</td><td><input type=\"text\" name=\"ip\"></td><td>hostname, IPv4, or IPv6, /24,/16,/8 suffixes optional for IPv4, prefix ok for IPv6</td></tr>\n" +
"<tr><td>IPv6 Prefix:</td><td><input type=\"text\" name=\"ipv6\"></td><td></td></tr>\n" +
"<tr><td>MTU:</td><td><input type=\"text\" name=\"mtu\"></td><td></td></tr>\n" +
"<tr><td>Port Number:</td><td><input type=\"text\" name=\"port\"></td><td></td></tr>\n" +

View File

@@ -71,7 +71,7 @@
<label><input type="radio" class="optbox" name="udpAutoIP" value="hidden" <%=nethelper.getUdpAutoIPChecked(2) %> >
<%=intl._t("Hidden mode - do not publish IP")%> <i><%=intl._t("(prevents participating traffic)")%></i></label><br>
<label><input type="radio" class="optbox" name="udpAutoIP" value="fixed" <%=nethelper.getUdpAutoIPChecked(1) %> >
<%=intl._t("Specify host name or IP")%>:</label>
<%=intl._t("Specify hostname or IP")%>:</label>
<%=nethelper.getAddressSelector() %>
</td>
</tr>
@@ -149,7 +149,7 @@
<label><input type="radio" class="optbox" name="ntcpAutoIP" value="disabled" <%=nethelper.getTcpAutoIPChecked(4) %> >
<%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that throttles or blocks outbound TCP)")%></i></label><br>
<label><input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(1) %> >
<%=intl._t("Specify host name or IP")%>:</label>
<%=intl._t("Specify hostname or IP")%>:</label>
<input name ="ntcphost" type="text" size="16" value="<jsp:getProperty name="nethelper" property="ntcphostname" />" >
</td>
</tr>

View File

@@ -102,7 +102,7 @@ class SSLUtil {
if (success) {
logAlways("Created self-signed certificate for " + cname + " in keystore: " + ks.getAbsolutePath() + "\n" +
"The certificate was generated randomly, and is not associated with your " +
"IP address, host name, router identity, or destination keys.");
"IP address, hostname, router identity, or destination keys.");
} else {
error("Failed to create SAM SSL keystore.\n" +
"If you create the keystore manually, you must add " + PROP_KEYSTORE_PASSWORD + " and " + PROP_KEY_PASSWORD +

View File

@@ -103,7 +103,7 @@ class SSLUtil {
if (success) {
logAlways("Created self-signed certificate for " + cname + " in keystore: " + ks.getAbsolutePath() + "\n" +
"The certificate was generated randomly, and is not associated with your " +
"IP address, host name, router identity, or destination keys.");
"IP address, hostname, router identity, or destination keys.");
} else {
error("Failed to create SAM SSL keystore.\n" +
"If you create the keystore manually, you must add " + PROP_KEYSTORE_PASSWORD + " and " + PROP_KEY_PASSWORD +

View File

@@ -119,7 +119,7 @@ public class AddressBean
boolean needsIDN = false;
// Here we do easy checks and throw translated exceptions.
// We do checks on the whole host name, not on each "label", so
// We do checks on the whole hostname, not on each "label", so
// we allow '.', and some untranslated errors will be thrown by IDN.toASCII()
for (int i = 0; i < host.length(); i++) {
char c = host.charAt(i);

View File

@@ -310,14 +310,14 @@ public class AddressbookBean extends BaseBean
else
message = _t("Destination changed for {0}.", displayHost);
if (!host.endsWith(".i2p"))
message += "<br>" + _t("Warning - host name does not end with \".i2p\"");
message += "<br>" + _t("Warning - hostname does not end with \".i2p\"");
// clear form
hostname = null;
destination = null;
} else {
if (message.length() <= 0) {
if (wasB32)
message = _t("Invalid Base 32 host name.");
message = _t("Invalid Base 32 hostname.");
else
message = _t("Invalid Base 64 destination.");
}
@@ -326,10 +326,10 @@ public class AddressbookBean extends BaseBean
} catch (IllegalArgumentException iae) {
message = iae.getMessage();
if (message == null)
message = _t("Invalid host name \"{0}\".", hostname);
message = _t("Invalid hostname \"{0}\".", hostname);
}
} else {
message = _t("Please enter a host name and destination");
message = _t("Please enter a hostname and destination");
}
// clear search when adding
search = null;

View File

@@ -319,7 +319,7 @@ public class NamingServiceBean extends AddressbookBean
else
message = _t("Destination changed for {0}.", displayHost);
if (!host.endsWith(".i2p"))
message += "<br>" + _t("Warning - host name does not end with \".i2p\"");
message += "<br>" + _t("Warning - hostname does not end with \".i2p\"");
// clear form
hostname = null;
destination = null;
@@ -331,7 +331,7 @@ public class NamingServiceBean extends AddressbookBean
if (msg != null && msg.length() > 0)
message = msg;
else if (wasB32)
message = _t("Invalid Base 32 host name.");
message = _t("Invalid Base 32 hostname.");
else
message = _t("Invalid Base 64 destination.");
}
@@ -339,10 +339,10 @@ public class NamingServiceBean extends AddressbookBean
} catch (IllegalArgumentException iae) {
message = iae.getMessage();
if (message == null)
message = _t("Invalid host name \"{0}\".", hostname);
message = _t("Invalid hostname \"{0}\".", hostname);
}
} else {
message = _t("Please enter a host name and destination");
message = _t("Please enter a hostname and destination");
}
// clear search when adding
search = null;
@@ -375,7 +375,7 @@ public class NamingServiceBean extends AddressbookBean
}
if( changed ) {
if (deleted == 1)
// parameter is a host name
// parameter is a hostname
message += _t("Destination {0} deleted.", name);
else
// parameter will always be >= 2

View File

@@ -349,7 +349,7 @@ public interface I2PSession {
public Destination lookupDest(Hash h, long maxWait) throws I2PSessionException;
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. Waits a max of 10 seconds by default.
*
* This only makes sense for a b32 hostname, OR outside router context.
@@ -402,7 +402,7 @@ public interface I2PSession {
public Destination lookupDest(String name) throws I2PSessionException;
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. See above for details.
* @param maxWait ms
* @since 0.9.11
@@ -411,7 +411,7 @@ public interface I2PSession {
public Destination lookupDest(String name, long maxWait) throws I2PSessionException;
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. See above for details.
* Same as lookupDest() but with a failure code in the return value
*

View File

@@ -1707,7 +1707,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
}
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. Waits a max of 10 seconds by default.
*
* This only makes sense for a b32 hostname, OR outside router context.
@@ -1729,7 +1729,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
}
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. See above for details.
* @param maxWait ms
* @since 0.9.11
@@ -1745,7 +1745,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
}
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. See above for details.
* Same as lookupDest() but with a failure code in the return value
*
@@ -1767,7 +1767,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
}
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. See above for details.
* @param maxWait ms
* @since 0.9.11

View File

@@ -300,7 +300,7 @@ class SubSession extends I2PSessionMuxedImpl {
}
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. Waits a max of 10 seconds by default.
*
* This only makes sense for a b32 hostname, OR outside router context.
@@ -321,7 +321,7 @@ class SubSession extends I2PSessionMuxedImpl {
}
/**
* Ask the router to lookup a Destination by host name.
* Ask the router to lookup a Destination by hostname.
* Blocking. See above for details.
* @param maxWait ms
* @return null on failure

View File

@@ -22,7 +22,7 @@ import net.i2p.data.Destination;
* A naming service based on multiple "hosts.txt" files.
* Supports .b32.i2p and {b64} lookups.
* Supports caching.
* All host names are converted to lower case.
* All hostnames are converted to lower case.
*/
public class HostsTxtNamingService extends MetaNamingService {

View File

@@ -55,8 +55,8 @@ public abstract class NamingService {
}
/**
* Look up a host name.
* @return the Destination for this host name, or
* Look up a hostname.
* @return the Destination for this hostname, or
* <code>null</code> if name is unknown.
*/
public Destination lookup(String hostname) {
@@ -68,7 +68,7 @@ public abstract class NamingService {
* This implementation returns reverseLookup(dest, null).
*
* @param dest non-null
* @return a host name for this Destination, or <code>null</code>
* @return a hostname for this Destination, or <code>null</code>
* if none is known. It is safe for subclasses to always return
* <code>null</code> if no reverse lookup is possible.
*/
@@ -82,14 +82,14 @@ public abstract class NamingService {
* Subclasses implementing reverse lookups should override.
*
* @param h non-null
* @return a host name for this hash, or <code>null</code>
* @return a hostname for this hash, or <code>null</code>
* if none is known. It is safe for subclasses to always return
* <code>null</code> if no reverse lookup is possible.
*/
public String reverseLookup(Hash h) { return null; }
/**
* If the host name is a valid Base64 encoded destination, return the
* If the hostname is a valid Base64 encoded destination, return the
* decoded Destination. Useful as a "fallback" in custom naming
* implementations.
* This is misnamed as it isn't a "lookup" at all, but
@@ -342,7 +342,7 @@ public abstract class NamingService {
}
/**
* @return all known host names
* @return all known hostnames
* or empty Set if none;
* Returned Set is not necessarily sorted, implementation dependent
* @since 0.8.7
@@ -353,7 +353,7 @@ public abstract class NamingService {
/**
* @param options NamingService-specific, can be null
* @return all known host names (matching the options if non-null)
* @return all known hostnames (matching the options if non-null)
* or empty Set if none;
* Returned Set is not necessarily sorted, implementation dependent
* @since 0.8.7
@@ -521,7 +521,7 @@ public abstract class NamingService {
*
* @param d non-null
* @param options NamingService-specific, can be null
* @return host name or null
* @return hostname or null
* @since 0.8.7
*/
public String reverseLookup(Destination d, Properties options) {
@@ -576,7 +576,7 @@ public abstract class NamingService {
//// Begin new API for multiple Destinations
/**
* For NamingServices that support multiple Destinations for a single host name,
* For NamingServices that support multiple Destinations for a single hostname,
* return all of them.
*
* It is recommended that the returned list is in order of priority, highest-first,
@@ -594,7 +594,7 @@ public abstract class NamingService {
}
/**
* For NamingServices that support multiple Destinations and Properties for a single host name,
* For NamingServices that support multiple Destinations and Properties for a single hostname,
* return all of them.
*
* It is recommended that the returned list is in order of priority, highest-first,
@@ -698,7 +698,7 @@ public abstract class NamingService {
* Subclasses implementing reverse lookups should override.
*
* @param h non-null
* @return a non-empty list of host names for this hash, or <code>null</code>
* @return a non-empty list of hostnames for this hash, or <code>null</code>
* if none is known. It is safe for subclasses to always return
* <code>null</code> if no reverse lookup is possible.
* @since 0.9.26
@@ -713,7 +713,7 @@ public abstract class NamingService {
* This implementation returns reverseLookupAll(dest, null).
*
* @param dest non-null
* @return a non-empty list of host names for this Destination, or <code>null</code>
* @return a non-empty list of hostnames for this Destination, or <code>null</code>
* if none is known. It is safe for subclasses to always return
* <code>null</code> if no reverse lookup is possible.
* @since 0.9.26
@@ -729,7 +729,7 @@ public abstract class NamingService {
*
* @param d non-null
* @param options NamingService-specific, can be null
* @return a non-empty list of host names for this Destination, or <code>null</code>
* @return a non-empty list of hostnames for this Destination, or <code>null</code>
* @since 0.9.26
*/
public List<String> reverseLookupAll(Destination d, Properties options) {

View File

@@ -509,7 +509,7 @@ public class SingleFileNamingService extends NamingService {
/**
* @param options ignored
* @return all known host names, unsorted
* @return all known hostnames, unsorted
*/
public Set<String> getNames(Properties options) {
if (!_file.exists())

View File

@@ -390,8 +390,8 @@ public abstract class Addresses {
/**
* Caching version of InetAddress.getByName(host).getAddress(), which is slow.
* Caches numeric host names only.
* Will resolve but not cache DNS host names.
* Caches numeric hostnames only.
* Will resolve but not cache DNS hostnames.
*
* Unlike InetAddress.getByName(), we do NOT allow numeric IPs
* of the form d.d.d, d.d, or d, as these are almost certainly mistakes.
@@ -402,7 +402,7 @@ public abstract class Addresses {
* InetAddress.getByName() also returns 127.0.0.1 for a host "",
* but this is undocumented; as of 0.9.49, here we return null.
*
* @param host DNS or IPv4 or IPv6 host name; if null or empty returns null
* @param host DNS or IPv4 or IPv6 hostname; if null or empty returns null
* @return IP or null
* @since 0.9.3
*/
@@ -443,7 +443,7 @@ public abstract class Addresses {
/**
* Caching version of InetAddress.getByName(host).getAddress(), which is slow.
* Resolves literal IP addresses only, will not cause a DNS lookup.
* Will return null for host names.
* Will return null for hostnames.
*
* Unlike InetAddress.getByName(), we do NOT allow numeric IPs
* of the form d.d.d, d.d, or d, as these are almost certainly mistakes.
@@ -476,11 +476,11 @@ public abstract class Addresses {
/**
* For literal IP addresses, this is the same as getIP(String).
* For host names, will return the preferred type (IPv4/v6) if available,
* For hostnames, will return the preferred type (IPv4/v6) if available,
* else the other type if available.
* Will resolve but not cache DNS host names.
* Will resolve but not cache DNS hostnames.
*
* @param host DNS or IPv4 or IPv6 host name; if null returns null
* @param host DNS or IPv4 or IPv6 hostname; if null returns null
* @return IP or null
* @since 0.9.28
*/
@@ -522,9 +522,9 @@ public abstract class Addresses {
/**
* For literal IP addresses, this is the same as getIP(String).
* For host names, may return multiple addresses, both IPv4 and IPv6,
* For hostnames, may return multiple addresses, both IPv4 and IPv6,
* even if those addresses are not reachable due to configuration or available interfaces.
* Will resolve but not cache DNS host names.
* Will resolve but not cache DNS hostnames.
*
* Note that order of returned results, and whether
* multiple results for either IPv4 or IPv6 or both are actually
@@ -533,7 +533,7 @@ public abstract class Addresses {
* Number of results may also change based on caching at various layers,
* even if the ultimate name server results did not change.
*
* @param host DNS or IPv4 or IPv6 host name; if null returns null
* @param host DNS or IPv4 or IPv6 hostname; if null returns null
* @return non-empty list IPs, or null if none
* @since 0.9.28
*/

View File

@@ -249,7 +249,7 @@ public class I2PSSLSocketFactory {
/**
* Returns a socket to the host.
*
* A host argument that's an IP address (instead of a host name)
* A host argument that's an IP address (instead of a hostname)
* is not recommended, as this will probably fail
* SSL certificate validation.
*
@@ -267,9 +267,9 @@ public class I2PSSLSocketFactory {
/**
* Returns a socket to the host.
*
* An InetAddress argument created with an IP address (instead of a host name)
* An InetAddress argument created with an IP address (instead of a hostname)
* is not recommended, as this will perform a reverse DNS lookup to
* get the host name for certificate validation, which will probably then fail.
* get the hostname for certificate validation, which will probably then fail.
*
* Hostname validation is skipped for localhost addresses, but you still
* must trust the certificate.

View File

@@ -215,11 +215,11 @@ public class RouterAddress extends DataStructureImpl {
/**
* Caching version of InetAddress.getByName(getOption("host")).getAddress(), which is slow.
* Caches numeric host names, and negative caches also.
* Caches numeric hostnames, and negative caches also.
*
* As of 0.9.32, this works for literal IP addresses only, and does NOT resolve host names.
* If a host name is specified in the options, this will return null.
* Use getHost() if you need the host name.
* As of 0.9.32, this works for literal IP addresses only, and does NOT resolve hostnames.
* If a hostname is specified in the options, this will return null.
* Use getHost() if you need the hostname.
*
* @return IP or null
* @since 0.9.3
@@ -228,7 +228,7 @@ public class RouterAddress extends DataStructureImpl {
if (_ip == NOT_LOOKED_UP) {
// Only look up once, even if it fails, so we don't generate excessive DNS lookups.
// The lifetime of a RouterAddress object is a few hours at most,
// it will get republished or expired, so it's OK even for host names.
// it will get republished or expired, so it's OK even for hostnames.
String host = getHost();
if (host != null)
_ip = Addresses.getIPOnly(host);

View File

@@ -26,7 +26,7 @@ import net.i2p.util.Log;
/**
* Look up the lease of a hash, to convert it to a Destination for the client.
* Or, since 0.9.11, lookup a host name in the naming service.
* Or, since 0.9.11, lookup a hostname in the naming service.
*/
class LookupDestJob extends JobImpl {
private final Log _log;

View File

@@ -97,7 +97,7 @@ class SSLClientListenerRunner extends ClientListenerRunner {
if (success) {
_log.logAlways(Log.INFO, "Created self-signed certificate for " + cname + " in keystore: " + ks.getAbsolutePath() + "\n" +
"The certificate was generated randomly, and is not associated with your " +
"IP address, host name, router identity, or destination keys.");
"IP address, hostname, router identity, or destination keys.");
} else {
_log.error("Failed to create I2CP SSL keystore.\n" +
"This is for the Sun/Oracle keytool, others may be incompatible.\n" +

View File

@@ -405,7 +405,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
* Collect the IPs for all routers in the DB, and queue them for lookup,
* then fire off the periodic lookup task for the first time.
*
* As of 0.9.32, works only for literal IPs, ignores host names.
* As of 0.9.32, works only for literal IPs, ignores hostnames.
*/
private class QueueAll implements SimpleTimer.TimedEvent {
public void timeReached() {
@@ -508,7 +508,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
* Not recommended for our local router hash, as we may not be either in the cache or netdb,
* or may not be publishing an IP.
*
* As of 0.9.32, works only for literal IPs, returns null for host names.
* As of 0.9.32, works only for literal IPs, returns null for hostnames.
*
* @param peer not ourselves - use getOurCountry() for that
* @return two-letter lower-case country code or null
@@ -532,7 +532,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
* Return first IP (v4 or v6) we find, any transport.
* Not validated, may be local, etc.
*
* As of 0.9.32, works only for literal IPs, returns null for host names.
* As of 0.9.32, works only for literal IPs, returns null for hostnames.
*
* @return IP or null
*/
@@ -549,7 +549,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
* Return first valid IP (v4 or v6) we find, any transport.
* Local and other invalid IPs will not be returned.
*
* As of 0.9.32, works only for literal IPs, returns null for host names.
* As of 0.9.32, works only for literal IPs, returns null for hostnames.
*
* @return IP or null
* @since 0.9.18

View File

@@ -865,7 +865,7 @@ class EventPumper implements Runnable {
con.setKey(key);
RouterAddress naddr = con.getRemoteAddress();
try {
// no DNS lookups, do not use host names
// no DNS lookups, do not use hostnames
int port = naddr.getPort();
byte[] ip = naddr.getIP();
if (port <= 0 || ip == null)

View File

@@ -205,7 +205,7 @@ class UDPAddress {
public String getHost() { return _host; }
/**
* As of 0.9.32, will NOT resolve host names.
* As of 0.9.32, will NOT resolve hostnames.
*
* @return InetAddress or null
*/
@@ -228,7 +228,7 @@ class UDPAddress {
int getIntroducerCount() { return (_introAddresses == null ? 0 : _introAddresses.length); }
/**
* As of 0.9.32, will NOT resolve host names.
* As of 0.9.32, will NOT resolve hostnames.
*
* @throws NullPointerException if getIntroducerCount() == 0
* @throws ArrayIndexOutOfBoundsException if i &lt; 0 or i &gt;= getIntroducerCount()
@@ -321,7 +321,7 @@ class UDPAddress {
/**
* Caching version of InetAddress.getByName(host), which is slow.
* Caches numeric IPs only.
* As of 0.9.32, will NOT resolve host names.
* As of 0.9.32, will NOT resolve hostnames.
*
* Unlike InetAddress.getByName(), we do NOT allow numeric IPs
* of the form d.d.d, d.d, or d, as these are almost certainly mistakes.

View File

@@ -17,7 +17,7 @@
* - Fixed isRootDevice() to check the ST header.
* 11/19/04
* - Theo Beisch <theo.beisch@gmx.de>
* - Changed getRemoteAddress() to return the adresss instead of the host name.
* - Changed getRemoteAddress() to return the adresss instead of the hostname.
*
******************************************************************/