> For the complete documentation index, see [llms.txt](https://docs.9proxy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.9proxy.com/developers/sdk/sdk-native-c/functions/setproxyauth.md).

# SetProxyAuth

Configure proxy authentication with a username and password.

```c
int SetProxyAuth(int enable, char* username, char* password)
```

***

## Parameters

* **enable**: 1 to enable authentication, 0 to disable.
* **username**: Proxy username.
* **password**: Proxy password.

## Return Value

* int: 0 if success.

## Example

```c
// example

SetProxyAuth(1, "user", "pass");

```
