Skip to content

Commit

Permalink
fix: clash tcp http config (#1574)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMohammad20000 authored Jan 6, 2025
1 parent 09fd329 commit 843e61a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/subscription/clash.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
import json
from random import choice
from uuid import UUID
from app.utils.helpers import yml_uuid_representer

import yaml
from jinja2.exceptions import TemplateNotFound

from app.subscription.funcs import get_grpc_gun
from app.templates import render_template
from app.utils.helpers import yml_uuid_representer
from config import (
CLASH_SETTINGS_TEMPLATE,
CLASH_SUBSCRIPTION_TEMPLATE,
MUX_TEMPLATE,
USER_AGENT_TEMPLATE
USER_AGENT_TEMPLATE,
)


Expand Down Expand Up @@ -173,16 +173,15 @@ def make_node(self,

if type == 'shadowsocks':
type = 'ss'
if network in ("http", "h2", "h3"):
network = "h2"
if network in ('tcp', 'raw') and headers == 'http':
network = 'http'
if network == 'httpupgrade':
network = 'ws'
is_httpupgrade = True
else:
is_httpupgrade = False
if network in ("http", "h2", "h3"):
network = "h2"

node = {
'name': remark,
'type': type,
Expand Down

0 comments on commit 843e61a

Please sign in to comment.