ComposantsComponents › Internet
Règle le proxy du job. Par défaut, il écrit les propriétés système de Java (http.proxyHost, https.proxyHost, socksProxyHost ou ftp.proxyHost), qui valent ensuite pour tout le processus Java du job ; option décochée, le proxy ne sert qu'aux hôtes d'une liste. Seuls les composants qui se connectent par les clients réseau de Java le suivent : tHttpRequest, tFileFetch en FTP, le code d'un tJava. Ni tREST ni tFileFetch en HTTP ne le suivent.
Sets the proxy of the job. By default, it writes the Java system properties (http.proxyHost, https.proxyHost, socksProxyHost or ftp.proxyHost), which then apply to the whole Java process of the job; with the option unchecked, the proxy only serves the hosts of a list. Only the components that connect through the network clients of Java follow it: tHttpRequest, tFileFetch over FTP, the code of a tJava. Neither tREST nor tFileFetch over HTTP follow it.
EntréeInput
Aucune : composant seul dans son sous-job.None: component alone in its subjob.
SortieOutput
Aucune : des propriétés de la JVM.None: properties of the JVM.
Déclencheurs en sortieOutput triggers
On Subjob Ok On Subjob Error On Component Ok On Component Error Run if
Le tSetProxy s'exécute d'abord, seul dans son sous-job ; les appels qui suivent passent par le proxy. Placé dans un tPrejob, il vaut pour tout le job. The tSetProxy runs first, alone in its subjob; the calls that follow go through the proxy. Placed in a tPrejob, it applies to the whole job.
http://, Proxy Https pour https://. Pour les deux, il faut deux tSetProxy.Choose the Proxy type from the called addresses: Http Proxy for http://, Https Proxy for https://. For both, two tSetProxy are needed."3128"), et vérifiez la liste Aucun proxy pour : sa valeur par défaut ne fait pas ce qu'elle annonce (voir Les exceptions).Give the host and the port of the proxy, as strings ("3128"), and check the No Proxy for list: its default value does not do what it says (see The exceptions).Les libellés sont ceux de l'onglet Composant ; le nom technique, en gris, est celui du paramètre dans le fichier du job. Labels are those of the Component tab; the technical name, in grey, is the parameter name in the job file.
| ParamètreSetting | DéfautDefault | VisibleShown | Description |
|---|---|---|---|
| Utiliser la configuration du proxy de Java Virtual MachineUse Java Virtual Machine Proxy ConfigurationPROXY_GLOBAL | OuiYes | ToujoursAlways | Cochée : le proxy est écrit dans les propriétés système de Java et vaut pour tous les hôtes, sauf les exceptions. Décochée : le sélecteur de proxy de Talend remplace celui de Java et n'envoie au proxy que les hôtes de la table URI utilisant le proxy (voir Liste d'hôtes). Checked: the proxy is written to the Java system properties and applies to all hosts, except the exceptions. Unchecked: the proxy selector of Talend replaces the one of Java and only sends to the proxy the hosts of the URIs to use proxy table (see Host list). |
| Type de proxyProxy typePROXY_TYPE | Proxy HttpHttp Proxy | Toujours ; Proxy FTP avec la configuration de la JVM seulementAlways; FTP Proxy with the JVM configuration only |
Proxy Http : adresses http:// seulement. Proxy Https : https:// seulement. Proxy Socks : toutes les connexions (HTTP, HTTPS, FTP), au niveau TCP. Proxy FTP : adresses ftp://, demandées à un proxy HTTP (voir Exemples).
Http Proxy: http:// addresses only. Https Proxy: https:// only. Socks Proxy: every connection (HTTP, HTTPS, FTP), at the TCP level. FTP Proxy: ftp:// addresses, asked to an HTTP proxy (see Examples).
|
| Hôte du proxyProxy hostPROXY_HOST | "127.0.0.1" |
ToujoursAlways | Nom ou adresse du proxy, expression Java. Name or address of the proxy, a Java expression. |
| Port du proxyProxy portPROXY_PORT | "8080" |
ToujoursAlways |
Une chaîne de caractères : le modèle la passe à System.setProperty, qui n'accepte pas un nombre.
A string: the template passes it to System.setProperty, which does not accept a number.
|
| Utiliser l'authentificationUse authenticationUSE_AUTH | NonNo | Proxy HttpsHttps Proxy | Affiche l'utilisateur et le mot de passe du proxy HTTPS. Shows the user and the password of the HTTPS proxy. |
| Utilisateur(trice) du proxy / Mot de passe du proxyProxy user / Proxy passwordPROXY_USERNAME, PROXY_PASSWORD | "", "" |
Proxy Http, Proxy Socks, Proxy Https avec authentificationHttp Proxy, Socks Proxy, Https Proxy with authentication |
Compte du proxy. En HTTP et HTTPS, le composant installe un Authenticator de Java qui le donne à chaque demande d'authentification, y compris celles des serveurs (voir Sécurité). En SOCKS avec la configuration de la JVM, il n'est pas utilisé par Java 21 (voir L'authentification).
Account of the proxy. In HTTP and HTTPS, the component installs a Java Authenticator that gives it to every authentication request, including those of the servers (see Security). In SOCKS with the JVM configuration, it is not used by Java 21 (see Authentication).
|
| Aucun proxy pourNo Proxy forNONPROXYHOSTS | "192.168.0.* | localhost" |
Proxy Http ou FTP, configuration de la JVMHttp or FTP Proxy, JVM configuration |
Hôtes appelés sans le proxy, séparés par |, sans espace, avec * au début ou à la fin : "*.intra.example.com|10.*". Écrit dans http.nonProxyHosts ou ftp.nonProxyHosts. Voir Les exceptions.
Hosts called without the proxy, separated by |, without spaces, with * at the start or the end: "*.intra.example.com|10.*". Written to http.nonProxyHosts or ftp.nonProxyHosts. See The exceptions.
|
| URI utilisant le proxyURIs to use proxyHOSTS | vide (Hôte "", Port -1)empty (Host "", Port -1) |
Configuration de la JVM décochéeJVM configuration unchecked |
Table Hôte / Port : les hôtes envoyés au proxy. Port -1 : tous les ports de l'hôte. Les autres hôtes sont appelés directement.
Host / Port table: the hosts sent to the proxy. Port -1: every port of the host. The other hosts are called directly.
|
| ParamètreSetting | DéfautDefault | VisibleShown | Description |
|---|---|---|---|
| Autorise l'en-tête d'authentification basiqueEnable Basic Authentication HeaderENABLE_BASIC | NonNo | Proxy Https avec authentificationHttps Proxy with authentication |
Vide la propriété jdk.http.auth.tunneling.disabledSchemes : Java refuse par défaut l'authentification Basic pour ouvrir un tunnel HTTPS. Nécessaire avec un proxy qui demande Basic ; efficace seulement avant le premier appel HTTP du job (voir L'authentification).
Empties the jdk.http.auth.tunneling.disabledSchemes property: by default, Java refuses Basic authentication to open an HTTPS tunnel. Needed with a proxy that asks for Basic; effective only before the first HTTP call of the job (see Authentication).
|
| Proxy disponible pour le thread uniquementThread isolated proxyTHREAD_ONLY | NonNo | Configuration de la JVM décochéeJVM configuration unchecked | Les hôtes de la table ne valent que pour le fil d'exécution du composant (sous-jobs en parallèle). Non essayé. The hosts of the table only apply to the thread of the component (subjobs in parallel). Not tried. |
Le composant ne règle aucun autre composant : il change la configuration de Java. Ce qui passe par le client HTTP ou FTP de Java (java.net.URL) la suit ; les composants qui ont leur propre client HTTP l'ignorent. Relevé dans des jobs où le même serveur d'essai était appelé par chaque composant, le proxy notant ce qu'il recevait.
The component sets no other component: it changes the configuration of Java. What goes through the HTTP or FTP client of Java (java.net.URL) follows it; the components that have their own HTTP client ignore it. Read from jobs where the same test server was called by each component, the proxy writing down what it received.
| ComposantComponent | Configuration de la JVMJVM configuration | Liste d'hôtesHost list |
|---|---|---|
| tHttpRequest | Oui (HTTP, HTTPS, SOCKS)Yes (HTTP, HTTPS, SOCKS) | Non : appel direct (défaut de tHttpRequest, voir Liste d'hôtes)No: direct call (defect of tHttpRequest, see Host list) |
Code Java (URL.openConnection() dans un tJava)Java code (URL.openConnection() in a tJava) | Oui (même client que tHttpRequest)Yes (same client as tHttpRequest) | OuiYes |
| tFileFetch en FTPtFileFetch over FTP | Oui (Proxy FTP)Yes (FTP Proxy) | Non essayéNot tried |
| tFileFetch en HTTP, HTTPStFileFetch over HTTP, HTTPS | Non : il a ses propres options de proxyNo: it has its own proxy options | Non essayéNot tried |
| tREST | Non : aucun proxy possibleNo: no proxy possible | Non essayéNot tried |
tREST et tFileFetch créent un client Apache HttpClient 4 sans lui demander de lire les propriétés système : ils ne voient ni http.proxyHost ni le sélecteur de proxy. Les autres composants qui se connectent (bases de données, tRESTClient, messagerie…) n'ont pas été essayés ici ; un proxy SOCKS de la JVM s'applique à toute connexion TCP faite par un client de Java.
tREST and tFileFetch create an Apache HttpClient 4 client without asking it to read the system properties: they see neither http.proxyHost nor the proxy selector. The other components that connect (databases, tRESTClient, mail…) were not tried here; a SOCKS proxy of the JVM applies to every TCP connection made by a Java client.
Un tSetProxy suivi d'un tJava qui affiche les propriétés posées, puis le proxy que Java choisirait pour quelques adresses (ProxySelector.getDefault().select(…) : rien n'est appelé). Hôte "127.0.0.1", port "3128", les autres réglages par défaut sauf mention.
A tSetProxy followed by a tJava that displays the properties set, then the proxy Java would choose for a few addresses (ProxySelector.getDefault().select(…): nothing is called). Host "127.0.0.1", port "3128", the other settings by default unless stated.
http.proxySet = [true] http.proxyHost = [127.0.0.1] http.proxyPort = [3128] http.nonProxyHosts = [192.168.0.* | localhost] http.proxyUser = [proxyuser] http.proxyPassword = [proxypass] ProxySelector: sun.net.spi.DefaultProxySelector http://www.example.com/ -> [HTTP @ 127.0.0.1/<unresolved>:3128] https://www.example.com/ -> [DIRECT] ftp://ftp.example.com/ -> [DIRECT] http://localhost:8080/ -> [DIRECT] http://127.0.0.1/ -> [DIRECT] http://192.168.0.10/ -> [HTTP @ 127.0.0.1/<unresolved>:3128] http://intranet.example.com/ -> [HTTP @ 127.0.0.1/<unresolved>:3128]
Les adresses https:// restent directes. http.proxyUser et http.proxyPassword ne sont pas lues par Java : c'est l'Authenticator installé à côté qui répond au proxy. Le mot de passe est en clair dans les propriétés de la JVM.
The https:// addresses stay direct. http.proxyUser and http.proxyPassword are not read by Java: the Authenticator installed alongside answers the proxy. The password is in clear text in the properties of the JVM.
https.proxyHost = [127.0.0.1] https.proxyPort = [3128] jdk.http.auth.tunneling.disabledSchemes = [] ProxySelector: sun.net.spi.DefaultProxySelector http://www.example.com/ -> [DIRECT] https://www.example.com/ -> [HTTP @ 127.0.0.1/<unresolved>:3128] ftp://ftp.example.com/ -> [DIRECT] http://localhost:8080/ -> [DIRECT] http://127.0.0.1/ -> [DIRECT] http://192.168.0.10/ -> [DIRECT] http://intranet.example.com/ -> [DIRECT]
Aucune liste d'exceptions n'est écrite : en HTTPS, Java lit celle de HTTP (http.nonProxyHosts).
No exception list is written: in HTTPS, Java reads the HTTP one (http.nonProxyHosts).
"1080", avec un utilisateurSocks Proxy, port "1080", with a usersocksProxySet = [true] socksProxyHost = [127.0.0.1] socksProxyPort = [1080] java.net.socks.username = [proxyuser] java.net.socks.password = [proxypass] ProxySelector: sun.net.spi.DefaultProxySelector http://www.example.com/ -> [SOCKS @ 127.0.0.1/<unresolved>:1080] https://www.example.com/ -> [SOCKS @ 127.0.0.1/<unresolved>:1080] ftp://ftp.example.com/ -> [SOCKS @ 127.0.0.1/<unresolved>:1080] http://localhost:8080/ -> [DIRECT] http://127.0.0.1/ -> [DIRECT] http://192.168.0.10/ -> [SOCKS @ 127.0.0.1/<unresolved>:1080] http://intranet.example.com/ -> [SOCKS @ 127.0.0.1/<unresolved>:1080]
ftpProxySet = [true] ftp.proxyHost = [127.0.0.1] ftp.proxyPort = [3128] ftp.nonProxyHosts = [192.168.0.* | localhost] ProxySelector: sun.net.spi.DefaultProxySelector http://www.example.com/ -> [DIRECT] https://www.example.com/ -> [DIRECT] ftp://ftp.example.com/ -> [HTTP @ 127.0.0.1/<unresolved>:3128] http://localhost:8080/ -> [DIRECT] http://127.0.0.1/ -> [DIRECT] http://192.168.0.10/ -> [DIRECT] http://intranet.example.com/ -> [DIRECT]
Java envoie les adresses ftp:// à un proxy de type HTTP, qui doit savoir les servir.
Java sends the ftp:// addresses to an HTTP-type proxy, which must know how to serve them.
Java découpe la liste sur | sans retirer les espaces, puis compare chaque motif au nom de l'hôte. Avec la valeur par défaut "192.168.0.* | localhost", les motifs sont 192.168.0.*␣ et ␣localhost : aucun ne correspond à rien. Dans le relevé ci-dessus, http://192.168.0.10/ passe par le proxy.
Java splits the list on | without removing the spaces, then compares each pattern with the name of the host. With the default value "192.168.0.* | localhost", the patterns are 192.168.0.*␣ and ␣localhost: none matches anything. In the reading above, http://192.168.0.10/ goes through the proxy.
Java 21 ajoute toujours localhost|127.*|[::1]|0.0.0.0|[::0] à une liste non vide : localhost et 127.0.0.1 restent directs, même retirés de la liste. Seule une liste vide ("") les envoie au proxy ; c'est le réglage de nos exemples, dont le serveur d'essai écoute sur 127.0.0.1. Avec la liste par défaut, l'appel du même serveur est parti sans le proxy, dont le journal est resté vide.
Java 21 always adds localhost|127.*|[::1]|0.0.0.0|[::0] to a non-empty list: localhost and 127.0.0.1 stay direct, even removed from the list. Only an empty list ("") sends them to the proxy; that is the setting of our examples, whose test server listens on 127.0.0.1. With the default list, the call to the same server left without the proxy, whose log stayed empty.
Sans espace, un * seulement au début ou à la fin d'un motif : "192.168.0.*|*.intra.example.com". Les motifs portent sur le nom tel qu'écrit dans l'adresse appelée, sans résolution DNS. Avec Proxy Socks ou Proxy Https, le champ est caché : la liste lue par Java pour une adresse http:// ou https:// reste http.nonProxyHosts, à poser au besoin par un premier tSetProxy Proxy Http ou par l'argument JVM -Dhttp.nonProxyHosts=….
Without spaces, a * only at the start or the end of a pattern: "192.168.0.*|*.intra.example.com". The patterns apply to the name as written in the called address, with no DNS resolution. With Socks Proxy or Https Proxy, the field is hidden: the list Java reads for an http:// or https:// address stays http.nonProxyHosts, to be set if needed by a first Http Proxy tSetProxy or by the JVM argument -Dhttp.nonProxyHosts=….
Le composant installe le sélecteur de proxy de Talend (org.talend.proxy.TalendProxySelector) comme sélecteur de Java et lui donne les hôtes de la table. Table "www.example.com" / -1 et "127.0.0.1" / 8080, même relevé que plus haut :
The component installs the proxy selector of Talend (org.talend.proxy.TalendProxySelector) as the selector of Java and gives it the hosts of the table. Table "www.example.com" / -1 and "127.0.0.1" / 8080, same reading as above:
http.proxySet = [local] ProxySelector: org.talend.proxy.TalendProxySelector http://www.example.com/ -> [HTTP @ /127.0.0.1:3128] https://www.example.com/ -> [HTTP @ /127.0.0.1:3128] ftp://ftp.example.com/ -> [DIRECT] http://127.0.0.1:8080/ -> [HTTP @ /127.0.0.1:3128] http://127.0.0.1:9090/ -> [DIRECT] http://192.168.0.10/ -> [DIRECT] http://intranet.example.com/ -> [DIRECT]
Le sélecteur sert le code qui passe par URL.openConnection(). tHttpRequest, lui, ne l'utilise pas : il lui demande le proxy de l'URI entière au lieu de son hôte et de son port, ne trouve rien et se connecte directement. Liste "127.0.0.1" / -1, un tHttpRequest puis un tJava vers le même serveur d'essai ; le proxy n'a reçu que l'appel du tJava :
The selector serves the code that goes through URL.openConnection(). tHttpRequest does not use it: it asks it for the proxy of the whole URI instead of its host and its port, finds nothing and connects directly. List "127.0.0.1" / -1, a tHttpRequest then a tJava to the same test server; the proxy only received the call of the tJava:
method=GET path=/echo?from=tHttpRequest accept=*/* user-agent=Java/21.0.12.1 body= tJava_1 (URL.openConnection): 200, via proxy: true
Journal du proxy d'essai :Log of the test proxy:
[proxy] GET http://127.0.0.1:54525/echo?from=tJava HTTP/1.1 [proxy] -> 200 (76 bytes, from 127.0.0.1:54525)
C'est un défaut de tHttpRequest dans Talaxie 9.0.6 (getProxyForUriString reçoit l'URI). Pour un tHttpRequest derrière un proxy, gardez la configuration de la JVM.
This is a defect of tHttpRequest in Talaxie 9.0.6 (getProxyForUriString receives the URI). For a tHttpRequest behind a proxy, keep the JVM configuration.
| TypeType | Ce que fait le composantWhat the component does | Résultat (proxy qui demande Basic)Result (proxy asking for Basic) |
|---|---|---|
| Proxy HttpHttp Proxy | Authenticator par défaut de Java avec l'utilisateur et le mot de passe, posé même si l'utilisateur est videDefault Java Authenticator with the user and the password, set even if the user is empty | Réponse 407, puis la même requête avec Proxy-Authorization : accepté407 response, then the same request with Proxy-Authorization: accepted |
| Proxy Https, sans Autorise l'en-tête…Https Proxy, without Enable Basic… | AuthenticatorAuthenticator | Refusé : Java n'envoie pas Basic dans le CONNECT du tunnelRejected: Java does not send Basic in the CONNECT of the tunnel |
| Proxy Https, avec Autorise l'en-tête…Https Proxy, with Enable Basic… | Authenticator et jdk.http.auth.tunneling.disabledSchemes=""Authenticator and jdk.http.auth.tunneling.disabledSchemes="" | Accepté, si aucun appel HTTP n'a eu lieu avant dans le jobAccepted, if no HTTP call happened before in the job |
| Proxy Socks, configuration de la JVMSocks Proxy, JVM configuration | Propriétés java.net.socks.username et java.net.socks.password, que Java 21 ne lit pasjava.net.socks.username and java.net.socks.password properties, which Java 21 does not read | Refusé : Java envoie le nom de l'utilisateur du système et aucun mot de passeRejected: Java sends the name of the system user and no password |
| Liste d'hôtes (HTTP, HTTPS, SOCKS)Host list (HTTP, HTTPS, SOCKS) | Authentificateur de Talend, qui ne répond qu'au proxy (hôte et port)Authenticator of Talend, which only answers the proxy (host and port) | Accepté (essayé en SOCKS)Accepted (tried in SOCKS) |
Java lit jdk.http.auth.tunneling.disabledSchemes une seule fois, au premier appel HTTP du processus : un tHttpRequest exécuté avant le tSetProxy rend l'option sans effet (voir Exemples). Les deux propriétés SOCKS viennent de très anciennes versions de Java ; avec Java 21, un proxy SOCKS authentifié demande la liste d'hôtes (option décochée), qui installe un authentificateur.
Java reads jdk.http.auth.tunneling.disabledSchemes only once, at the first HTTP call of the process: a tHttpRequest run before the tSetProxy makes the option useless (see Examples). The two SOCKS properties come from very old versions of Java; with Java 21, an authenticated SOCKS proxy needs the host list (option unchecked), which installs an authenticator.
Sorties copiées de l'exécution de jobs dans Talaxie (Java 21), avec un serveur HTTP d'essai (port 54525), un proxy HTTP d'essai (port 54528, ou 54530 pour celui qui demande l'utilisateur fictif proxyuser) et un proxy SOCKS d'essai, tous sur 127.0.0.1. Les journaux des serveurs montrent ce qu'ils ont reçu. Aucun proxy pour est vide ("") sauf mention.
Outputs copied from runs of jobs in Talaxie (Java 21), with a test HTTP server (port 54525), a test HTTP proxy (port 54528, or 54530 for the one that asks for the fictitious user proxyuser) and a test SOCKS proxy, all on 127.0.0.1. The logs of the servers show what they received. No Proxy for is empty ("") unless stated.
Les trois composants appellent /echo, que le serveur d'essai renvoie en texte ; le tJava affiche le fichier reçu par tFileFetch.
The three components call /echo, which the test server sends back as text; the tJava displays the file received by tFileFetch.
method=GET path=/echo?from=tHttpRequest accept=*/* user-agent=Java/21.0.12.1 body= method=GET path=/echo?from=tREST user-agent=Apache-HttpClient/4.5.13 (Java/21.0.12.1) body= ||200 echo.txt (97 bytes) method=GET path=/echo?from=tFileFetch user-agent=Apache-HttpClient/4.5.13 (Java/21.0.12.1) body=
Journal du proxy : seul l'appel de tHttpRequest y est passé.Log of the proxy: only the call of tHttpRequest went through it.
[proxy] GET http://127.0.0.1:54525/echo?from=tHttpRequest HTTP/1.1 [proxy] -> 200 (83 bytes, from 127.0.0.1:54525)
Utilisateur "proxyuser", mot de passe "proxypass" (fictifs). tHttpRequest appelle /hello. Journal du proxy :
User "proxyuser", password "proxypass" (fictitious). tHttpRequest calls /hello. Log of the proxy:
[proxyauth] GET http://127.0.0.1:54525/hello HTTP/1.1 [proxyauth] -> 407 [proxyauth] GET http://127.0.0.1:54525/hello HTTP/1.1 [proxyauth] Proxy-Authorization: Basic cHJveHl1c2VyOnByb3h5cGFzcw== [proxyauth] -> 200 (27 bytes, from 127.0.0.1:54525)
Console :Console:
Hello from the test server CONNECTED=true, RESPONSE_CODE=200, ERROR_MESSAGE=null
tSetProxy_1 en Proxy Http pour vider http.nonProxyHosts, tSetProxy_2 en Proxy Https, tSetKeystore pour le certificat autosigné du serveur HTTPS d'essai (port 54526). Le proxy n'ouvre qu'un tunnel :
tSetProxy_1 as Http Proxy to empty http.nonProxyHosts, tSetProxy_2 as Https Proxy, tSetKeystore for the self-signed certificate of the test HTTPS server (port 54526). The proxy only opens a tunnel:
[proxy] CONNECT 127.0.0.1:54526 HTTP/1.1 [proxy] -> 200 Connection established (tunnel)
Même job, proxy authentifié, Utiliser l'authentification cochée. Sans Autorise l'en-tête d'authentification basique, Java n'envoie pas l'utilisateur dans le tunnel : Same job, authenticated proxy, Use authentication checked. Without Enable Basic Authentication Header, Java does not send the user in the tunnel:
Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required" CONNECTED=false, RESPONSE_CODE=null, ERROR_MESSAGE=Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
Case cochée, journal du proxy :Box checked, log of the proxy:
[proxyauth] CONNECT 127.0.0.1:54526 HTTP/1.1 [proxyauth] -> 407 [proxyauth] CONNECT 127.0.0.1:54526 HTTP/1.1 [proxyauth] Proxy-Authorization: Basic cHJveHl1c2VyOnByb3h5cGFzcw== [proxyauth] -> 200 Connection established (tunnel)
Case cochée encore, mais un premier tHttpRequest (http://, sans proxy) placé avant les tSetProxy : le second tHttpRequest échoue avec le même message Unable to tunnel through proxy…, car Java avait déjà lu la propriété.
Box still checked, but a first tHttpRequest (http://, without proxy) placed before the tSetProxy: the second tHttpRequest fails with the same Unable to tunnel through proxy… message, because Java had already read the property.
tSetProxy en Proxy Socks, puis tHttpRequest vers /hello. Job lancé avec l'argument JVM -Dhttp.nonProxyHosts= (liste vide), sans quoi 127.0.0.1 resterait direct. Journal du proxy SOCKS : une connexion TCP relayée.
tSetProxy as Socks Proxy, then tHttpRequest to /hello. Job started with the JVM argument -Dhttp.nonProxyHosts= (empty list), otherwise 127.0.0.1 would stay direct. Log of the SOCKS proxy: one relayed TCP connection.
[socks] 55111 client methods=[0, 2] [socks] 55111 CONNECT 127.0.0.1:54525
Utilisateur "proxyuser", mot de passe "proxypass", configuration de la JVM. Job lancé aussi avec -Duser.name=osuser, pour que le journal ne montre pas le nom du compte qui l'exécute :
User "proxyuser", password "proxypass", JVM configuration. Job also started with -Duser.name=osuser, so that the log does not show the name of the account that runs it:
SOCKS : authentication failed CONNECTED=false, RESPONSE_CODE=null, ERROR_MESSAGE=SOCKS : authentication failed
Journal du proxy SOCKS :Log of the SOCKS proxy:
[socksauth] 57807 client methods=[0, 2] [socksauth] 57807 auth user='osuser' password=(empty) -> refused [socksauth] 57808 client methods=[0, 2] [socksauth] 57808 auth user='osuser' password=(empty) -> refused
Configuration de la JVM décochée, hôte "127.0.0.1" dans la table et appel par un tJava : auth user='proxyuser' password=ok -> accepted.
JVM configuration unchecked, host "127.0.0.1" in the table and call from a tJava: auth user='proxyuser' password=ok -> accepted.
tFileFetch en ftp, URI "ftp://demo:demo@127.0.0.1:54531/in/products.csv" (serveur FTP d'essai). Java ne parle pas FTP au proxy : il lui demande l'URL par HTTP. Journal du proxy, qui a fait le transfert FTP lui-même :
tFileFetch in ftp, URI "ftp://demo:demo@127.0.0.1:54531/in/products.csv" (test FTP server). Java does not speak FTP to the proxy: it asks it for the URL over HTTP. Log of the proxy, which did the FTP transfer itself:
[proxy] GET ftp://demo:demo@127.0.0.1:54531/in/products.csv HTTP/1.1 [proxy] -> 200 (56 bytes, by FTP from 127.0.0.1:54531)
Le tJava affiche le fichier enregistré :The tJava displays the saved file:
products.csv (56 bytes) id;name;price 1;Notebook;3.50 2;Pen;1.20 3;Stapler;8.90
L'utilisateur et le mot de passe FTP de l'URI partent en clair vers le proxy, dans la ligne de la requête HTTP. The FTP user and password of the URI go in clear text to the proxy, in the line of the HTTP request.
tJava_1 lit http.proxyHost ; tJava_2 la lit depuis un autre fil d'exécution :
tJava_1 reads http.proxyHost; tJava_2 reads it from another thread:
tJava_1: http.proxyHost = 127.0.0.1 other thread: http.proxyHost = 127.0.0.1
Les propriétés restent jusqu'à la fin du processus Java : rien ne les retire, et un second tSetProxy ne fait que réécrire celles de son type. The properties remain until the end of the Java process: nothing removes them, and a second tSetProxy only rewrites those of its type.
En Proxy Http et Proxy Https (configuration de la JVM), l'Authenticator du composant répond à toute demande d'authentification, sans regarder qui la fait. Proxy sans authentification, utilisateur "proxyuser" renseigné, puis tHttpRequest vers /auth/basic (qui demande un compte) sans Authentification requise. Journal du serveur appelé, deux premières requêtes :
In Http Proxy and Https Proxy (JVM configuration), the Authenticator of the component answers every authentication request, without looking at who makes it. Proxy without authentication, user "proxyuser" filled in, then tHttpRequest to /auth/basic (which asks for an account) without Need authentication. Log of the called server, first two requests:
[http] GET /auth/basic HTTP/1.1 [http] Accept-Encoding: identity [http] Cache-Control: no-cache [http] Pragma: no-cache [http] User-Agent: Java/21.0.12.1 [http] Host: 127.0.0.1:54525 [http] Accept: */* [http] -> 401 (24 bytes) [http] GET /auth/basic HTTP/1.1 [http] Accept-Encoding: identity [http] Cache-Control: no-cache [http] Pragma: no-cache [http] User-Agent: Java/21.0.12.1 [http] Host: 127.0.0.1:54525 [http] Accept: */* [http] Authorization: Basic cHJveHl1c2VyOnByb3h5cGFzcw== [http] -> 401 (24 bytes)
cHJveHl1c2VyOnByb3h5cGFzcw== est proxyuser:proxypass : le serveur a reçu le compte du proxy, vingt fois, avant que Java n'abandonne (Server redirected too many times (20)). Tout serveur appelé par le job peut ainsi le recueillir. La liste d'hôtes (option décochée) n'a pas ce défaut : son authentificateur ne répond qu'au proxy.
cHJveHl1c2VyOnByb3h5cGFzcw== is proxyuser:proxypass: the server received the account of the proxy, twenty times, before Java gave up (Server redirected too many times (20)). Any server called by the job can thus collect it. The host list (option unchecked) does not have this flaw: its authenticator only answers the proxy.
Il n'y a qu'un Authenticator dans Java. Un tHttpRequest avec Authentification requise pose le sien à chaque exécution et remplace celui du tSetProxy : son compte part alors vers le proxy. Proxy qui demande proxyuser, tHttpRequest avec demo : le proxy a reçu vingt fois Proxy-Authorization: Basic ZGVtbzpkZW1v (demo:demo), et le composant a fini sur Request failed:407 Proxy Authentication Required. Les deux comptes ne peuvent pas servir dans le même job.
There is only one Authenticator in Java. A tHttpRequest with Need authentication sets its own at each run and replaces the one of the tSetProxy: its account then goes to the proxy. Proxy asking for proxyuser, tHttpRequest with demo: the proxy received Proxy-Authorization: Basic ZGVtbzpkZW1v (demo:demo) twenty times, and the component ended on Request failed:407 Proxy Authentication Required. The two accounts cannot be used in the same job.
Le mot de passe déchiffré est écrit dans http.proxyPassword ou java.net.socks.password, lisible par tout le code du processus. Passez-le par une variable de contexte chargée au lancement (tContextLoad), hors du job.
The decrypted password is written to http.proxyPassword or java.net.socks.password, readable by all the code of the process. Pass it through a context variable loaded at start (tContextLoad), outside the job.
Leur client HTTP ne lit ni les propriétés système ni le sélecteur de proxy. tFileFetch a ses propres options de proxy (onglet Paramètres avancés) ; tREST n'en a aucune.Their HTTP client reads neither the system properties nor the proxy selector. tFileFetch has its own proxy options (Advanced settings tab); tREST has none.
Proxy Http ne vaut pas pour https://, ni Proxy Https pour http://. Un job qui appelle les deux a besoin de deux tSetProxy, enchaînés.Http Proxy does not apply to https://, nor Https Proxy to http://. A job that calls both needs two tSetProxy, chained.
À cause des espaces, "192.168.0.* | localhost" envoie au proxy les adresses 192.168.0.x qu'elle voulait exclure. Réécrivez-la sans espace.Because of the spaces, "192.168.0.* | localhost" sends to the proxy the 192.168.0.x addresses it meant to exclude. Rewrite it without spaces.
Les propriétés de proxy sont relues à chaque connexion, mais Autorise l'en-tête d'authentification basique ne compte que s'il précède tout appel HTTP du processus. Mettez le tSetProxy dans un tPrejob.The proxy properties are read again at each connection, but Enable Basic Authentication Header only counts if it comes before any HTTP call of the process. Put the tSetProxy in a tPrejob.
Avec la configuration de la JVM, le port passe tel quel à System.setProperty : écrivez "3128", ou String.valueOf(context.proxyPort) pour une variable de contexte entière.With the JVM configuration, the port goes as it is to System.setProperty: write "3128", or String.valueOf(context.proxyPort) for an integer context variable.
En SOCKS, toute connexion TCP d'un client Java du job passe par le proxy, pas seulement le HTTP : celles des autres composants aussi, s'ils utilisent les sockets de Java. Les exceptions suivent alors le protocole appelé (http.nonProxyHosts, ftp.nonProxyHosts, socksNonProxyHosts), que le composant ne pose pas.In SOCKS, every TCP connection of a Java client of the job goes through the proxy, not only HTTP: those of the other components too, if they use the Java sockets. The exceptions then follow the called protocol (http.nonProxyHosts, ftp.nonProxyHosts, socksNonProxyHosts), which the component does not set.
tHttpRequest · appel HTTP qui suit le proxy de la JVMHTTP call that follows the proxy of the JVMtFileFetch · téléchargement, avec ses propres options de proxydownload, with its own proxy optionstSetKeystore · certificats pour les appels HTTPScertificates for the HTTPS callstREST · client REST, sans proxyREST client, without proxytPrejob · régler le proxy avant tout le resteset the proxy before everything elsetFTPConnection · connexion FTP et SFTP, avec son proxy SOCKSFTP and SFTP connection, with its SOCKS proxy