# Stardog Connection via HTTP\_PROXY

**URL:** <https://community.stardog.com/t/stardog-connection-via-http-proxy/483>\
**Category:** Support\
**Created:** [July 25, 2017, 1:32pm UTC](https://community.stardog.com/t/stardog-connection-via-http-proxy/483 "2017-07-25T13:32:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![felix-loesch](https://avatars.discourse-cdn.com/v4/letter/f/3e96dc/32.png) [@felix-loesch](https://community.stardog.com/u/felix-loesch)\
**Post date:** [July 25, 2017, 1:32pm UTC](https://community.stardog.com/t/stardog-connection-via-http-proxy/483/1 "2017-07-25T13:32:18Z")

</div>

Hi,

I am trying to connect to a Stardog instance via HTTP using a HTTP Proxy.

Connection aConn = ConnectionConfiguration  
.to(“db”)  
.server(aServerUrl) //connecting to remote server  
// .from(aServerUrl)  
.credentials(“username”, “password”)  
.connect())

However all I get is a java.net.UnknownHostException.  
How can I tell the ConnectionConfiguration to use a HTTP PROXY?

Best regards  
Felix

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [July 25, 2017, 1:52pm UTC](https://community.stardog.com/t/stardog-connection-via-http-proxy/483/2 "2017-07-25T13:52:25Z")

</div>

Are you able to resolve what aServerUrl is set to?

---

<div class="post-metadata">

**Author:** ![felix-loesch](https://avatars.discourse-cdn.com/v4/letter/f/3e96dc/32.png) [@felix-loesch](https://community.stardog.com/u/felix-loesch)\
**Post date:** [July 25, 2017, 2:07pm UTC](https://community.stardog.com/t/stardog-connection-via-http-proxy/483/3 "2017-07-25T14:07:26Z")

</div>

Yes. I am able to resolve what aServeUrl is set to when using the HTTP proxy settings (e.g. in the browser).

Is there a way to tell Stardog ConnectionConfiguration to use Java System Properties such as:

System.getProperties().put(“http.proxyHost”, “127.0.0.1”);  
System.getProperties().put(“http.proxyPort”, “53128”);

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [July 25, 2017, 2:53pm UTC](https://community.stardog.com/t/stardog-connection-via-http-proxy/483/4 "2017-07-25T14:53:32Z")

</div>

You can give it a try by setting them in STARDOG\_JAVA\_ARGS

```
STARDOG_JAVA_ARGS="-Xmx2g -Xms2g -XX:MaxDirectMemorySize=1g -Dhttp.proxyHost=127.0.0.1 -Dhttp.protyPort=53128"

```

and restarting stardog

(I’m a stardog user so I can’t be more spacific about if it is expected to work so let me know if it does )

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [August 8, 2017, 2:53pm UTC](https://community.stardog.com/t/stardog-connection-via-http-proxy/483/5 "2017-08-08T14:53:34Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
