Skip to content

Conversation

@imgk
Copy link

@imgk imgk commented Feb 13, 2025

1. What does this change do, exactly?

Add UDP in HTTP support

2. Please link to the relevant issues.

klzgrad/naiveproxy#617

3. Which documentation changes (if any) need to be made because of this PR?

4. Checklist

  • I have written tests and verified that they fail without my change
  • I have squashed any insignificant commits
  • This change has comments for package types, values, functions, and non-obvious lines of code

@imgk imgk force-pushed the udpinhttp branch 2 times, most recently from 4d46ff7 to 02e512b Compare February 14, 2025 11:51
forwardproxy.go Outdated
h.udpProxyServer = &udpProxyServer{}
// parse http2/http3 uri template
if h.URITemplate == "" {
h.uriTemplate = uritemplate.MustNew("https://{host}/.well-known/masque/udp/{target_host}/{target_port}/")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to introduce a library for this? Can you use simpler functions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

return Request(net.JoinHostPort(targetHost, strconv.Itoa(targetPort))), nil
}

func (h *Handler) checkACL(hostPort string) (bool, error) {
Copy link
Owner

@klzgrad klzgrad Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to have duplicated forwardproxy.go.

I think much of this should be embedded along side the logic of tcp/http.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@imgk imgk force-pushed the udpinhttp branch 13 times, most recently from 0aa5ca1 to 95737ac Compare February 18, 2025 12:52
@imgk imgk force-pushed the udpinhttp branch 2 times, most recently from 30eb2ff to 6b9937e Compare February 28, 2025 13:26
@imgk imgk force-pushed the udpinhttp branch 6 times, most recently from e7abc00 to c3819b0 Compare March 5, 2025 11:28
@naiba
Copy link

naiba commented Apr 2, 2025

any update?

@klzgrad
Copy link
Owner

klzgrad commented Apr 4, 2025

Review comments are not addressed yet.

@naiba
Copy link

naiba commented Apr 19, 2025

How is it now? This PR looks very interesting, does the naiveproxy client need to be modified?

@klzgrad
Copy link
Owner

klzgrad commented Apr 20, 2025

I asked for not duplicating forwardproxy.go into a udp version, and there was no answer for that.

@imgk
Copy link
Author

imgk commented Apr 22, 2025

I asked for not duplicating forwardproxy.go into a udp version, and there was no answer for that.

Hi, I misunderstood your request there. I believe this is done now.

@naiba
Copy link

naiba commented May 18, 2025

Hi @imgk, Does this feature require any changes to the client? Or does it already support the client that complies with the RFC definition?

@imgk
Copy link
Author

imgk commented May 18, 2025

Hi @imgk, Does this feature require any changes to the client? Or does it already support the client that complies with the RFC definition?

Hi, this modified forwardproxy should be compatible with any client which supports RFC 9298. However, this module is not well tested yet. The function is not guaranteed. Feedbacks are welcomed.

PrintNow and others added 3 commits June 17, 2025 22:09
Fixes caddyserver#170

- Update `dial_timeout` example to use duration unit (30s)
- Change parameter type from [integer] to [Duration] to match Go type
- Update description to clarify duration unit requirement

This change makes the documentation more accurate and consistent
with Go's time.Duration type usage.
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/golang/glog](https://github.com/golang/glog) from 1.2.0 to 1.2.4.
- [Release notes](https://github.com/golang/glog/releases)
- [Commits](golang/glog@v1.2.0...v1.2.4)

---
updated-dependencies:
- dependency-name: github.com/golang/glog
  dependency-version: 1.2.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@aaravrav
Copy link

How is the status of the PR now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants