[GH-ISSUE #1861] Support setting CURLOPT_PROXY via fstab #947

Closed
opened 2026-03-04 01:50:08 +03:00 by kerem · 3 comments
Owner

Originally created by @nodakai on GitHub (Jan 14, 2022).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1861

Additional Information

Version of s3fs being used (s3fs --version)

s3fs    1.90-1

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

fuse    2.9.9-5

Kernel information (uname -r)

5.10.0-10-amd64

GNU/Linux Distribution, if applicable (cat /etc/os-release)

Distributor ID: Debian
Description:    Debian GNU/Linux bookworm/sid
Release:        testing
Codename:       bookworm

s3fs command line used, if applicable

sudo env ALL_PROXY="$ALL_PROXY" s3fs mybucket /mnt/s3fs -o allow_other -o url=https://s3.myregion.amazonaws.com

This works fine. However,

/etc/fstab entry, if applicable

mybucket /mnt/s3fs fuse.s3fs _netdev,allow_other,url=https://s3.mybucket.amazonaws.com 0 0

there doesn't seem to be any ways to configure s3fs to use proxies via fstab

s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)

Details about issue

Related: #400
We need something like ... _netdev,proxy=socks5h://myproxy:1080 0 0

Originally created by @nodakai on GitHub (Jan 14, 2022). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1861 ### Additional Information #### Version of s3fs being used (s3fs --version) s3fs 1.90-1 #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) fuse 2.9.9-5 #### Kernel information (uname -r) 5.10.0-10-amd64 #### GNU/Linux Distribution, if applicable (cat /etc/os-release) Distributor ID: Debian Description: Debian GNU/Linux bookworm/sid Release: testing Codename: bookworm #### s3fs command line used, if applicable sudo env ALL_PROXY="$ALL_PROXY" s3fs mybucket /mnt/s3fs -o allow_other -o url=https://s3.myregion.amazonaws.com This works fine. However, #### /etc/fstab entry, if applicable mybucket /mnt/s3fs fuse.s3fs _netdev,allow_other,url=https://s3.mybucket.amazonaws.com 0 0 there doesn't seem to be any ways to configure s3fs to use proxies via fstab #### s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs) ### Details about issue Related: #400 We need something like `... _netdev,proxy=socks5h://myproxy:1080 0 0`
kerem closed this issue 2026-03-04 01:50:08 +03:00
Author
Owner

@nodakai commented on GitHub (Aug 25, 2022):

I found a quick workaround, I created a wrapper script as /bin/mys3fs which looks like

#!/bin/sh
export ALL_PROXY=socks5h://myproxy:1080
exec /bin/s3fs "$@"

and registered it to fstab e.g. mybucket /mnt/s3fs fuse.mys3fs _netdev,...
I'm no expert of FUSE but it seems to run an executable foobar in $PATH for a fstab entry whose type is fuse.foobar https://github.com/libfuse/libfuse/blob/master/util/mount.fuse.c#L291

Keeping this ticket open because native support is much more desirable than a hack like this.

<!-- gh-comment-id:1227639497 --> @nodakai commented on GitHub (Aug 25, 2022): I found a quick workaround, I created a wrapper script as `/bin/mys3fs` which looks like ```sh #!/bin/sh export ALL_PROXY=socks5h://myproxy:1080 exec /bin/s3fs "$@" ``` and registered it to `fstab` _e.g._ `mybucket /mnt/s3fs fuse.mys3fs _netdev,...` I'm no expert of FUSE but it seems to run an executable `foobar` in `$PATH` for a fstab entry whose type is `fuse.foobar` https://github.com/libfuse/libfuse/blob/master/util/mount.fuse.c#L291 Keeping this ticket open because native support is much more desirable than a hack like this.
Author
Owner

@ggtakec commented on GitHub (Aug 27, 2022):

I tried it, and it seems that s3fs behavior changes with the ALL_PROXY variable.
In other words, libcurl seems to work correctly with the ALL_PROXY variable.
(The command line raised in this issue seems to work just fine.)

<!-- gh-comment-id:1229149887 --> @ggtakec commented on GitHub (Aug 27, 2022): I tried it, and it seems that s3fs behavior changes with the ALL_PROXY variable. In other words, libcurl seems to work correctly with the ALL_PROXY variable. (The command line raised in this issue seems to work just fine.)
Author
Owner

@ggtakec commented on GitHub (Feb 8, 2023):

PR #2075 implemented command line options for proxy.
It can be used as an alternative to setting proxy by environment variable.
I will close this issue, but if you have a problem yet, please reopen or post new issue.

<!-- gh-comment-id:1422656428 --> @ggtakec commented on GitHub (Feb 8, 2023): PR #2075 implemented command line options for proxy. It can be used as an alternative to setting proxy by environment variable. I will close this issue, but if you have a problem yet, please reopen or post new issue.
Sign in to join this conversation.
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
starred/s3fs-fuse#947
No description provided.