title: Java OPC-UA Client Eclipse Milo endpoint URL changes to localhost
body: <p>I am using Java OPC-UA client <a href="https://github.com/eclipse/milo" rel="noreferrer">Eclipse Milo</a>. Whenever I create a session using endpoint URL of server, method <code>UaTcpStackClient.getEndpoints()</code> changes URL to <code>localhost</code>.</p>
  
  <pre><code>String endpointUrl = "opc.tcp://10.8.0.104:48809";
  
  EndpointDescription[] endpoints = UaTcpStackClient.getEndpoints(endpointUrl).get();
  
  EndpointDescription endpoint = Arrays.stream(endpoints)
              .filter(e -&gt; e.getSecurityPolicyUri().equals(securityPolicy.getSecurityPolicyUri()))
              .findFirst().orElseThrow(() -&gt; new Exception("no desired endpoints returned"));
  </code></pre>
  
  <p>However value of <code>endpoint.getEndpointUrl()</code> returns <code>opc.tcp://127.0.0.1:4880/</code> which results failure in connection.</p>
  
  <p>I have no idea why my OPC URL gets changed?</p>