Question: Is there a way to provide a corporate proxy configuration? #220

Closed
opened 2025-12-29 14:25:34 +01:00 by adam · 10 comments
Owner

Originally created by @Benny1007 on GitHub (Oct 29, 2019).

for all other requests i'd like to just forward onto someother.server.internal but i get hit by my corporate proxy, how do I provide a corporate proxy for all other requests?

stub.Given(
  Request
    .Create()
    .WithPath("/*")
  ).AtPriority(1000)
  .RespondWith(Response.Create().WithProxy("http://someother.server.internal/api"));
Originally created by @Benny1007 on GitHub (Oct 29, 2019). for all other requests i'd like to just forward onto someother.server.internal but i get hit by my corporate proxy, how do I provide a corporate proxy for all other requests? ``` c# stub.Given( Request .Create() .WithPath("/*") ).AtPriority(1000) .RespondWith(Response.Create().WithProxy("http://someother.server.internal/api")); ```
adam added the feature label 2025-12-29 14:25:34 +01:00
adam closed this issue 2025-12-29 14:25:34 +01:00
Author
Owner

@StefH commented on GitHub (Oct 29, 2019):

Good question. This is not yet supported. I think the best place to add this is with:
public IResponseBuilder WithProxy(IProxyAndRecordSettings settings)

So adding a WebProxySettings property to IProxyAndRecordSettings which supports the URL, username and password would be a good start.

@StefH commented on GitHub (Oct 29, 2019): Good question. This is not yet supported. I think the best place to add this is with: `public IResponseBuilder WithProxy(IProxyAndRecordSettings settings)` So adding a WebProxySettings property to IProxyAndRecordSettings which supports the URL, username and password would be a good start.
Author
Owner

@StefH commented on GitHub (Oct 30, 2019):

Hello @Benny1007,
Can you please try the NuGet version WireMock.Net.1.0.36-ci-12100.nupkg from MyGet ?

@StefH commented on GitHub (Oct 30, 2019): Hello @Benny1007, Can you please try the NuGet version WireMock.Net.1.0.36-ci-12100.nupkg from MyGet ?
Author
Owner

@Benny1007 commented on GitHub (Oct 31, 2019):

Hi, how do I do that from within VisualStudio? I have ticked 'pre-release' but it doesn't show up.

@Benny1007 commented on GitHub (Oct 31, 2019): Hi, how do I do that from within VisualStudio? I have ticked 'pre-release' but it doesn't show up.
Author
Owner

@StefH commented on GitHub (Oct 31, 2019):

You need to add the nuget feed.
See https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions

@StefH commented on GitHub (Oct 31, 2019): You need to add the nuget feed. See https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
Author
Owner

@StefH commented on GitHub (Nov 5, 2019):

Can you test this?

@StefH commented on GitHub (Nov 5, 2019): Can you test this?
Author
Owner

@StefH commented on GitHub (Nov 18, 2019):

@Benny1007 Can you please test ?

@StefH commented on GitHub (Nov 18, 2019): @Benny1007 Can you please test ?
Author
Owner

@Benny1007 commented on GitHub (Nov 18, 2019):

Hi, sorry I thought I had responded already. Unfortunately I can't connect to the repository this test package resides in. At work we use a Nexus hosted repository that we don't have administrative control over. Any package that we as developers use has to be pulled through this corporate Nexus from nuget.org or other proxies the administrators see fit to set up.

@Benny1007 commented on GitHub (Nov 18, 2019): Hi, sorry I thought I had responded already. Unfortunately I can't connect to the repository this test package resides in. At work we use a Nexus hosted repository that we don't have administrative control over. Any package that we as developers use has to be pulled through this corporate Nexus from nuget.org or other proxies the administrators see fit to set up.
Author
Owner

@StefH commented on GitHub (Nov 18, 2019):

OK. I've uploaded that package also to the normal nuget.org, please get this one.

@StefH commented on GitHub (Nov 18, 2019): OK. I've uploaded that package also to the normal nuget.org, please get this one.
Author
Owner

@StefH commented on GitHub (Nov 22, 2019):

@Benny1007 Can you test that package?

@StefH commented on GitHub (Nov 22, 2019): @Benny1007 Can you test that package?
Author
Owner

@StefH commented on GitHub (Dec 7, 2019):

https://github.com/WireMock-Net/WireMock.Net/pull/370

@StefH commented on GitHub (Dec 7, 2019): https://github.com/WireMock-Net/WireMock.Net/pull/370
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#220