File size: 1,033 Bytes
2468dac
 
0a0921d
2468dac
 
 
 
ae146fa
 
 
b0b063c
a23bc3c
ae146fa
 
 
 
 
 
 
 
 
 
 
0a0921d
 
2468dac
0a0921d
a23bc3c
 
 
 
2468dac
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Use the lightweight Alpine Linux as the base image
FROM alpine:latest

# Install dante-server
RUN apk add --no-cache dante-server

# Create a simple configuration file for dante-server
RUN { \
    echo "logoutput: stderr"; \
    echo "internal: 0.0.0.0 port = 1080"; \
    echo "external: eth0"; \
    echo "socksmethod: none"; \   # Updated from 'method' to 'socksmethod'
    echo "user.privileged: root"; \
    echo "user.notprivileged: nobody"; \
    echo "client pass {"; \
    echo "    from: 0.0.0.0/0 to: 0.0.0.0/0"; \
    echo "    log: connect disconnect error"; \
    echo "}"; \
    echo "socks pass {"; \
    echo "    from: 0.0.0.0/0 to: 0.0.0.0/0"; \
    echo "    log: connect disconnect error"; \
    echo "}"; \
} > /etc/sockd.conf

# Expose the SOCKS proxy port
EXPOSE 1080

# Set capabilities and permissions
RUN setcap 'CAP_NET_BIND_SERVICE=+eip CAP_NET_ADMIN=+eip' /usr/sbin/sockd && \
    chmod 644 /etc/sockd.conf

# Start the dante-server using the configuration file
CMD ["sockd", "-f", "/etc/sockd.conf"]