Skip to content

Feat: enable encryption support for SMB #1271

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brunnre8
Copy link

@brunnre8 brunnre8 commented Jul 9, 2024

(Before we go on, yes I've read your PR template, yes I'm aware that you don't accept contributions 1:1. The PR is trivial however, consider this to be in the public domain.
Mostly just want to get the ball rolling into the right direction)

I have a few shares on the same samba host (linux box) that has for some of those shares enforced encryption

[home]
smb encrypt = required
# ... more stuff

[media]
smb encrypt = desired
# more stuff

The smb library you are using by default doesn't negotiate encryption support, if you connect to the host, leading to EPERM when the home share gets accessed as an example, while the media share is still accessible.

In order that the encryption support is actually enabled by the lib, you need to do so with the config builder.
Not sure if you want to unconditionally do so or if this needs to be some sort of frontend setting, but as you anyway want to do the coding on your own I didn't bother trying to do so.

The smb library refuses to connect to shared that have enforced
encryption unless the client allows encryption in the options
@brunnre8
Copy link
Author

brunnre8 commented Jul 9, 2024

Looking at the various performance issues on the lib, you probably want to add the encryption toggle over my bare bones one 😉

@zhanghai
Copy link
Owner

zhanghai commented Oct 5, 2024

Yes, I believe this will need a toggle, so this will be more like a feature request.

Despite that I'm grateful the author created and open sourced SMBJ, I also really hope we can have a better SMB library which simply does the encryption negotiation (and has less bugs - I often see crash reports due to this library).

@zhanghai zhanghai self-assigned this Oct 5, 2024
@zhanghai zhanghai added the enhancement New feature or request label Oct 5, 2024
@zhanghai zhanghai modified the milestones: v2.0.0, v1.8.0 Oct 5, 2024
@pinzutu
Copy link

pinzutu commented Feb 25, 2025

Hi, any ETA in sight for this feature? This would probably be useful for a lot of people, as you seemingly would have the only FOSS android files app that supports encrypted SMB shares.
In any case, thanks for this amazing piece of software!

@Nickrodz0503
Copy link

Nickrodz0503 commented Mar 2, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants