This string includes the properties you may need to connect through a proxy server with basic authentication.

jdbc:datadirect:s4hana:ServerName=servername;ProxyHost=proxy_host;
ProxyPassword=proxy_password;ProxyPort=proxy_port;ProxyUser=proxy_user;
User=user_name;Password=password;[property=value[;...]];

where:

servername
specifies the base URL of the service to which you want to connect. It is comprised of either the domain name or the IP address of the service. For example, for S/4HANA, it can be either https://mycompany.s4hana.ondemand.com or http://123.456.7.8.
proxy_host
specifies the proxy server to use for the first connection.
proxy_password
specifies the password needed to connect to a proxy server for the first connection.
proxy_port
specifies the port number where the proxy server is listening for requests for the first connection. The default is 0.
proxy_user
specifies the user name needed to connect to a proxy server for the first connection.
user_name
specifies the user name that is used to connect to the service. For example, jsmith.
password
specifies the password used to connect to the service.
property=value
specifies connection property settings. Multiple properties are separated by a semi-colon.
Note: The User and Password properties are not required to be stored in the connection string. They can also be passed separately by the application.

The following example connection strings include the properties required for using a proxy server with basic authentication.

For S/4HANA:
Connection conn = DriverManager.getConnection
  ("jdbc:datadirect:s4hana:ServerName=https://mycompany.s4hana.ondemand.com;
    ProxyHost=pserver;ProxyPassword=proxypwd;ProxyPort=808;ProxyUser=johndoe;
    User=jsmith;Password=secret;");
For BW/4HANA:
Connection conn = DriverManager.getConnection
  ("jdbc:datadirect:s4hana:ServerName=https://myinstance.company.com;
    ProxyHost=pserver;ProxyPassword=proxypwd;ProxyPort=808;ProxyUser=johndoe;
    User=jsmith;Password=secret;");