[GH-ISSUE #22] URL based client communication #12

Closed
opened 2026-05-05 10:56:46 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @ptheunis on GitHub (May 11, 2017).
Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/22

Is it currently possible to subscribe a particular client to url path?

Let's say i have 2 clients and 1 server.

client 1 should be responsible for responses to server:80/client1/query
client 2 should be responsible for responses to server:80/client2/query

Is this doable?

i tried changing the client tunnel endpoint to a path based on their "id" but that didn't work.

Originally created by @ptheunis on GitHub (May 11, 2017). Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/22 Is it currently possible to subscribe a particular client to url path? Let's say i have 2 clients and 1 server. client 1 should be responsible for responses to server:80/client1/query client 2 should be responsible for responses to server:80/client2/query Is this doable? i tried changing the client tunnel endpoint to a path based on their "id" but that didn't work.
Author
Owner

@mmatczuk commented on GitHub (May 11, 2017):

Hi @pault84,
I'd recommend using host so that you would have client1.server/query and client2.server/query this is simpler and more error prone. In general case striping URL path should be avoided see https://github.com/fabiolb/fabio/issues/2.

<!-- gh-comment-id:300890525 --> @mmatczuk commented on GitHub (May 11, 2017): Hi @pault84, I'd recommend using host so that you would have `client1.server/query` and `client2.server/query` this is simpler and more error prone. In general case striping URL path should be avoided see https://github.com/fabiolb/fabio/issues/2.
Author
Owner

@ptheunis commented on GitHub (May 11, 2017):

that would only work if host is an actual DNS name right? that would not work for IP's

<!-- gh-comment-id:300891868 --> @ptheunis commented on GitHub (May 11, 2017): that would only work if host is an actual DNS name right? that would not work for IP's
Author
Owner

@mmatczuk commented on GitHub (May 11, 2017):

Yep, you can use /etc/hosts for development and if you have like two or three clients you can also get some free DNS no problem.

<!-- gh-comment-id:300892828 --> @mmatczuk commented on GitHub (May 11, 2017): Yep, you can use `/etc/hosts` for development and if you have like two or three clients you can also get some free DNS no problem.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/go-http-tunnel#12
No description provided.