Skip to content

Commit

Permalink
chore: fix clash yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Mar 14, 2024
1 parent 7f28594 commit 9342d09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions apps/proxy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ class ProxyNode(BaseNodeModel, SequenceMixin):
("error", "error"),
)

enable_direct = models.BooleanField("允许直连", default=True)
enable_udp = models.BooleanField("是否开启UDP 转发", default=True)
native_ip = models.BooleanField("是否为原生 ip", default=False)
node_type = models.CharField(
"节点类型", default=NODE_TYPE_SS, choices=NODE_CHOICES, max_length=32
)
Expand All @@ -205,11 +208,8 @@ class ProxyNode(BaseNodeModel, SequenceMixin):
)
used_traffic = models.BigIntegerField("已用流量(单位字节)", default=0)
total_traffic = models.BigIntegerField("总流量(单位字节)", default=settings.GB)
enable_direct = models.BooleanField("允许直连", default=True)
enable_udp = models.BooleanField("是否开启UDP 转发", default=True)
xray_grpc_port = models.IntegerField("xray grpc port", default=23456)
provider_remark = models.CharField("vps备注", max_length=64, default="")
native_ip = models.BooleanField("是否为原生 ip", default=False)

ehco_listen_host = models.CharField(
"隧道监听地址", max_length=64, blank=True, null=True
Expand Down
6 changes: 4 additions & 2 deletions templates/clash/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ proxy-groups:
- auto
use:
- {{ provider_name }}-all

- name: PROXY-NATIVE-IP
type: select
use:
- {{ provider_name }}-native-ip

- name: auto
type: url-test
use:
- {{ provider_name }}
- {{ provider_name }}-all
- {{ provider_name }}-native-ip
url: "http://www.gstatic.com/generate_204"
interval: 300
tolerance: 150
Expand Down Expand Up @@ -186,4 +189,3 @@ rules:
- GEOIP,LAN,DIRECT
- GEOIP,CN,DIRECT
- MATCH,Final

0 comments on commit 9342d09

Please sign in to comment.