From 2d3b2d6590f5200ad8f013adea147eaccf9fa818 Mon Sep 17 00:00:00 2001
From: Ehco1996 <zh19960202@gmail.com>
Date: Sun, 28 Feb 2021 08:35:37 +0800
Subject: [PATCH] feat: add clash udp cfg close #470

---
 Dockerfile           | 2 ++
 apps/proxy/models.py | 1 +
 2 files changed, 3 insertions(+)

diff --git a/Dockerfile b/Dockerfile
index 82f01315bb..9a709db0f8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,6 +2,8 @@ FROM python:3.8-alpine as base
 
 LABEL Name=django-sspanel
 
+ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
+
 COPY requirements.txt /tmp/requirements.txt
 
 RUN apk add --update --no-cache mariadb-connector-c-dev tzdata \
diff --git a/apps/proxy/models.py b/apps/proxy/models.py
index 0ebb2c237d..99f7eac7a6 100644
--- a/apps/proxy/models.py
+++ b/apps/proxy/models.py
@@ -184,6 +184,7 @@ def get_user_clash_config(self, user, relay_rule=None):
                 "port": port,
                 "cipher": self.ss_config.method,
                 "password": user.ss_password,
+                "udp": True,
             }
         return json.dumps(config, ensure_ascii=False)