# Synthetic Monitoring using proxy servers

**URL:** https://discuss.elastic.co/t/synthetic-monitoring-using-proxy-servers/283389
**Category:** Synthetics
**Created:** [September 6, 2021, 1:30am UTC](https://discuss.elastic.co/t/synthetic-monitoring-using-proxy-servers/283389 "2021-09-06T01:30:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![shinmaeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shinmaeng/32/85734_2.png) [@shinmaeng](https://discuss.elastic.co/u/shinmaeng)
#### Post date: [September 6, 2021, 1:30am UTC](https://discuss.elastic.co/t/synthetic-monitoring-using-proxy-servers/283389/1 "2021-09-06T01:30:52Z")

</div>

Hi, elastic staffs.

I have two questions about Synthetic installed in private network.  
It can not call any outbound requests to the internet unless I do any network works.

1. I read the heartbeat document below about synthetic options.  
[Browser options | Heartbeat Reference [7.14] | Elastic](https://www.elastic.co/guide/en/beats/heartbeat/current/monitor-browser-options.html)  
But, I didn't find the proxy\_url option. Other types like http, tcp have the option that calls the proxy url instead of hosts.  
Can I apply the proxy\_url option when using a browser type option?

2. As I said earlier, It can't call outbound requests to the internet now.  
When the synthetic monitoring agent call the url, it gets network timeout 30s.  
But, it judges "Up" count even though the request fails because of the network block.  
I want to know that the way to judge "Down" when I get the network timeout.

Thank you in advance!!

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [September 29, 2021, 1:23pm UTC](https://discuss.elastic.co/t/synthetic-monitoring-using-proxy-servers/283389/2 "2021-09-29T13:23:03Z")

</div>

Apologies for the delay here. You can use a proxy server today by modifying the `synthetics.config.ts` file. I've posted an example below:

```auto
// note that `env` is the `env` argument passed to the synthetics program
// the default being `development`
export default (env): SyntheticsConfig => {
  const params: {[key: string]: any} = {};
  if (env === "production") {
    params.url = "https://elastic.github.io/synthetics-demo/"
  } else {
    const port = 8080;
    params.url = `http://localhost:${8080}`;
    params.devWebserver = {port};
  }
  return {params, playwrightOptions: {proxy: {server: "http://myproxy.example.net", username: "myuser", password: "mypass"}}};
};

```

I've also created [an issue](https://github.com/elastic/synthetics/issues/388) to support this via a CLI flag and heartbeat option since that would be more convenient in many cases.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 23, 2021, 1:24pm UTC](https://discuss.elastic.co/t/synthetic-monitoring-using-proxy-servers/283389/3 "2021-10-23T13:24:00Z")

</div>

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