Skip to content

Add support for UNIX domain socket #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged

Conversation

albb0920
Copy link
Contributor

This PR adds UNIX domain socket support for the addr option.

I want this as I run all my services behind nginx with unix domain socket.
I suppose there are more reasons someone would want to run
imageproxy without listening to a TCP port.

I never wrote any Go before this PR, I hope I haven't done anything stupid...

@google-cla
Copy link

google-cla bot commented Dec 16, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@codecov
Copy link

codecov bot commented Dec 16, 2020

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 59.69%. Comparing base (ef50c1f) to head (c391ca0).
Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
cmd/imageproxy/main.go 0.00% 13 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (ef50c1f) and HEAD (c391ca0). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (ef50c1f) HEAD (c391ca0)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #255       +/-   ##
===========================================
- Coverage   85.21%   59.69%   -25.53%     
===========================================
  Files           6       12        +6     
  Lines         717     1228      +511     
===========================================
+ Hits          611      733      +122     
- Misses         76      463      +387     
- Partials       30       32        +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@albb0920
Copy link
Contributor Author

@googlebot I signed it!

Allows listening to Unix domain socket with the `-addr` option.
The syntax is `unix:path`. (same as nginx `listen` directive)
@willnorris
Copy link
Owner

thanks for this. I reworked it a tad, since things have changed a bit since you opened this, but looks good.

@willnorris willnorris merged commit 731fa16 into willnorris:main Jun 30, 2025
8 of 10 checks passed
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.

2 participants