---
title: "Setting the IP of connection C#"  
description: "Setting the IP of connection C#"  
author: "Anonymous User"  
published: 2013-12-09  
updated: 2013-12-10  
canonical: https://www.mindstick.com/forum/1757/setting-the-ip-of-connection-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Setting the IP of connection C#

I have a [web browser](https://www.mindstick.com/blog/301688/best-web-browsers-for-2023) in my [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) and I want to change the IP of the incoming [connection](https://www.mindstick.com/articles/13012/what-makes-ethernet-connection-better-than-wifi) that's about to [load](https://answers.mindstick.com/qa/33737/what-is-meant-by-average-load-time) the page. How would I set the connection's [IP address](https://www.mindstick.com/articles/188405/difference-between-mac-address-and-ip-address)? I've done it before in [Java](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming) but I have no idea on how to do it in C#.

## Replies

### Reply by Anonymous User

Hi Tanuj,\

If you want to set the proxy address, you can do it on the WebRequest:

```
using System;using System.IO;using System.Net;class Program{    static void
Main(string[] args)    {        WebRequest wr
= WebRequest.Create("http://www.google.com");        WebProxy proxy
= new WebProxy("http://localhost:8888");        wr.Proxy =
proxy;        StreamReader
sr = new StreamReader(wr.GetResponse().GetResponseStream());       
Console.WriteLine(sr.ReadToEnd());       
Console.ReadLine();    }}
```


---

Original Source: https://www.mindstick.com/forum/1757/setting-the-ip-of-connection-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
