Giter VIP home page Giter VIP logo

hiddify-next-core's Introduction

hiddify-next-core

hiddify-next-core's People

Contributors

83hd4d avatar amirsaam avatar gfwfighter avatar hiddify-com avatar omid-the-great avatar problematicconsumer avatar real-alchemist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hiddify-next-core's Issues

Send the changes in singbox to upstream

The singbox upstream project doesn't really accept PRs, but you might be able to get the changes merged, considering the popularity of Hiddify Next.

While Hiddify Next is great, it isn't applicable for all purposes. It doesn't have GUI manual configuration support and obviously isn't usable on headless machines. (Eg. Routers)

Thanks.

Warp is Unusable in the Latest Version

I have downloaded the latest version of hiddify-core CLI (0bbd581), which operates normally when Warp+ is disabled. However, enabling Warp+ triggers the following error:
config options: {EnableFullConfig:false LogLevel:info EnableClashApi:true ClashApiPort:6756 ClashApiSecret: GeoIPPath:geo-assets/sagernet-sing-geoip-geoip.db GeoSitePath:geo-assets/sagernet-sing-geosite-geosite.db Rules:[{Domains:domain:.cn,geosite:cn IP:geoip:cn Port: Network: Protocol: Outbound:bypass}] Warp:{EnableWarp:true Mode:proxy_over_warp WireguardConfigStr:{"private-key":"aDdXNcfOGWz/NFyULaiQXr1Rzmjg2o/apRx9Ft30hFw=","local-address-ipv4":"172.16.0.2","local-address-ipv6":"2606:4700:110:8700:ebd3:5c0e:f25d:6f5a","peer-public-key":"bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=","ClientID":""} WireguardConfig:{PrivateKey:aDdXNcfOGWz/NFyULaiQXr1Rzmjg2o/apRx9Ft30hFw= LocalAddressIPv4:172.16.0.2 LocalAddressIPv6:2606:4700:110:8700:ebd3:5c0e:f25d:6f5a PeerPublicKey:bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo= ClientID:} FakePackets:5-10 FakePacketSize: FakePacketDelay:20-200 CleanIP:auto CleanPort:0 Account:{AccountID: AccessToken:}} Warp2:{EnableWarp:false Mode: WireguardConfigStr: WireguardConfig:{PrivateKey: LocalAddressIPv4: LocalAddressIPv6: PeerPublicKey: ClientID:} FakePackets: FakePacketSize: FakePacketDelay: CleanIP: CleanPort:0 Account:{AccountID: AccessToken:}} Mux:{Enable:false Padding:false MaxStreams:8 Protocol:h2mux} TLSTricks:{EnableFragment:false FragmentSize:1-500 FragmentSleep:0-500 MixedSNICase:false EnablePadding:false PaddingSize:1-1500} DNSOptions:{RemoteDnsAddress:tls://8.8.8.8 RemoteDnsDomainStrategy:0 DirectDnsAddress:local DirectDnsDomainStrategy:0 IndependentDNSCache:true EnableFakeDNS:false EnableDNSRouting:true} InboundOptions:{EnableTun:false EnableTunService:false SetSystemProxy:true MixedPort:2334 TProxyPort:2335 LocalDnsPort:6450 MTU:9000 StrictRoute:false TUNStack:mixed} URLTestOptions:{ConnectionTestUrl:http://www.gstatic.com/ URLTestInterval:300} RouteOptions:{ResolveDestination:false IPv6Mode:1 BypassLAN:true AllowConnectionFromLAN:false}}
opt.Warp={EnableWarp:true Mode:proxy_over_warp WireguardConfigStr:{"private-key":"aDdXNcfOGWz/NFyULaiQXr1Rzmjg2o/apRx9Ft30hFw=","local-address-ipv4":"172.16.0.2","local-address-ipv6":"2606:4700:110:8700:ebd3:5c0e:f25d:6f5a","peer-public-key":"bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=","ClientID":""} WireguardConfig:{PrivateKey:aDdXNcfOGWz/NFyULaiQXr1Rzmjg2o/apRx9Ft30hFw= LocalAddressIPv4:172.16.0.2 LocalAddressIPv6:2606:4700:110:8700:ebd3:5c0e:f25d:6f5a PeerPublicKey:bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo= ClientID:} FakePackets:5-10 FakePacketSize: FakePacketDelay:20-200 CleanIP:auto CleanPort:0 Account:{AccountID: AccessToken:}}
panic: runtime error: index out of range [0] with length 0

goroutine 17 [running, locked to thread]:
github.com/hiddify/hiddify-core/config.wireGuardToSingbox({{0x1c000141410, 0x2c}, {0x1c000273b40, 0xa}, {0x1c000141440, 0x26}, {0x1c000141470, 0x2c}, {0x0, 0x0}}, ...)
github.com/hiddify/hiddify-core/config/warp.go:49 +0x409
github.com/hiddify/hiddify-core/config.GenerateWarpSingbox({{0x1c000141410, 0x2c}, {0x1c000273b40, 0xa}, {0x1c000141440, 0x26}, {0x1c000141470, 0x2c}, {0x0, 0x0}}, ...)
github.com/hiddify/hiddify-core/config/warp.go:105 +0xf8
github.com/hiddify/hiddify-core/config.BuildConfig({0x0, {0x1c000273aac, 0x4}, 0x1, 0x1a64, {0x1c0003be760, 0x10}, {0x1c0001413b0, 0x27}, {0x1c0001413e0, ...}, ...}, ...)
github.com/hiddify/hiddify-core/config/config.go:412 +0x247e
github.com/hiddify/hiddify-core/v2.buildConfig({_, }, {0x0, {0x1c000273aac, 0x4}, 0x1, 0x1a64, {0x0, 0x0}, {0x1c0001413b0, ...}, ...})
github.com/hiddify/hiddify-core/v2/standalone.go:163 +0x1f8
github.com/hiddify/hiddify-core/v2.readAndBuildConfig({0x1c000272762, 0xb}, {0x1c0001489d8?, 0x14?}, 0x1c000291188)
github.com/hiddify/hiddify-core/v2/standalone.go:78 +0x10c
github.com/hiddify/hiddify-core/v2.RunStandalone({
, }, {, _}, {0x0, {0x754369d17a49, 0x4}, 0x0, 0x0, {0x0, ...}, ...})
github.com/hiddify/hiddify-core/v2/standalone.go:25 +0x112
github.com/hiddify/hiddify-core/cmd.runCommand(0x1c000163200?, {0x1c000242b80?, 0x4?, 0x754369d17a5d?})
github.com/hiddify/hiddify-core/cmd/cmd_run.go:33 +0x5b
github.com/spf13/cobra.(*Command).execute(0x75436adf4600, {0x1c000242b40, 0x4, 0x4})
github.com/spf13/[email protected]/command.go:987 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x75436adf5460)
github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:1039
github.com/hiddify/hiddify-core/cmd.ParseCli({0x1c0002e45b0?, 0x0?, 0x1c0000400c0?})
github.com/hiddify/hiddify-core/cmd/interface.go:35 +0x5b
main.parseCli(0x0?, 0xc000076040)
github.com/hiddify/hiddify-core/custom/cmd_interface.go:21 +0xd4
SIGABRT: abort
PC=0x754368e4f961 m=0 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 1 gp=0xc0000061c0 m=0 mp=0x5347a0 [syscall]:
runtime.cgocall(0x483910, 0xc00004c648)
runtime/cgocall.go:157 +0x4b fp=0xc00004c620 sp=0xc00004c5e8 pc=0x4066eb
main._Cfunc_parseCli(0x6, 0xc000076040)
_cgo_gotypes.go:97 +0x4c fp=0xc00004c648 sp=0xc00004c620 pc=0x48348c
main.main.func2(0x7ffdc8c4c705?)
github.com/hiddify/hiddify-core/cli/bydll/clibydll.go:33 +0x6e fp=0xc00004c6a0 sp=0xc00004c648 pc=0x4837ae
main.main()
github.com/hiddify/hiddify-core/cli/bydll/clibydll.go:33 +0x12d fp=0xc00004c750 sp=0xc00004c6a0 pc=0x4836ad
runtime.main()
runtime/proc.go:271 +0x29d fp=0xc00004c7e0 sp=0xc00004c750 pc=0x4380bd
runtime.goexit({})
runtime/asm_amd64.s:1695 +0x1 fp=0xc00004c7e8 sp=0xc00004c7e0 pc=0x464b61

goroutine 2 gp=0xc000006c40 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:402 +0xce fp=0xc00004cfa8 sp=0xc00004cf88 pc=0x4384ee
runtime.goparkunlock(...)
runtime/proc.go:408
runtime.forcegchelper()
runtime/proc.go:326 +0xb3 fp=0xc00004cfe0 sp=0xc00004cfa8 pc=0x438373
runtime.goexit({})
runtime/asm_amd64.s:1695 +0x1 fp=0xc00004cfe8 sp=0xc00004cfe0 pc=0x464b61
created by runtime.init.6 in goroutine 1
runtime/proc.go:314 +0x1a

goroutine 3 gp=0xc000007180 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:402 +0xce fp=0xc00004d780 sp=0xc00004d760 pc=0x4384ee
runtime.goparkunlock(...)
runtime/proc.go:408
runtime.bgsweep(0xc000028070)
runtime/mgcsweep.go:278 +0x94 fp=0xc00004d7c8 sp=0xc00004d780 pc=0x424774
runtime.gcenable.gowrap1()
runtime/mgc.go:203 +0x25 fp=0xc00004d7e0 sp=0xc00004d7c8 pc=0x4192c5
runtime.goexit({})
runtime/asm_amd64.s:1695 +0x1 fp=0xc00004d7e8 sp=0xc00004d7e0 pc=0x464b61
created by runtime.gcenable in goroutine 1
runtime/mgc.go:203 +0x66

goroutine 4 gp=0xc000007340 m=nil [GC scavenge wait]:
runtime.gopark(0xc000028070?, 0x4bfbd8?, 0x1?, 0x0?, 0xc000007340?)
runtime/proc.go:402 +0xce fp=0xc00004df78 sp=0xc00004df58 pc=0x4384ee
runtime.goparkunlock(...)
runtime/proc.go:408
runtime.(*scavengerState).park(0x534140)
runtime/mgcscavenge.go:425 +0x49 fp=0xc00004dfa8 sp=0xc00004df78 pc=0x422169
runtime.bgscavenge(0xc000028070)
runtime/mgcscavenge.go:653 +0x3c fp=0xc00004dfc8 sp=0xc00004dfa8 pc=0x4226fc
runtime.gcenable.gowrap2()
runtime/mgc.go:204 +0x25 fp=0xc00004dfe0 sp=0xc00004dfc8 pc=0x419265
runtime.goexit({})
runtime/asm_amd64.s:1695 +0x1 fp=0xc00004dfe8 sp=0xc00004dfe0 pc=0x464b61
created by runtime.gcenable in goroutine 1
runtime/mgc.go:204 +0xa5

goroutine 5 gp=0xc000007c00 m=nil [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:402 +0xce fp=0xc00004e620 sp=0xc00004e600 pc=0x4384ee
runtime.runfinq()
runtime/mfinal.go:194 +0x107 fp=0xc00004e7e0 sp=0xc00004e620 pc=0x418307
runtime.goexit({})
runtime/asm_amd64.s:1695 +0x1 fp=0xc00004e7e8 sp=0xc00004e7e0 pc=0x464b61
created by runtime.createfing in goroutine 1
runtime/mfinal.go:164 +0x3d

rax 0x0
rbx 0x0
rcx 0x754368e4f961
rdx 0x6
rdi 0xba4
rsi 0xba4
rbp 0x1c0004be3d8
rsp 0x1c0004be3c0
r8 0x1
r9 0x0
r10 0x8
r11 0x246
r12 0xba4
r13 0x69e
r14 0x1c000006700
r15 0x754369e30d14
rip 0x754368e4f961
rflags 0x246
cs 0x33
fs 0x0
gs 0x0

[Need help] hiddify-service not found

I have issue with compiling libcore to use in hiddify-next. As I understand, ffi cmakes relies on hiddify-service, but I can't found any references In make file's to compile it. Could you provide more information about this service, is it used in app and how I can compile it? Thanks you

Can't add clash api secret

Need to add clash api secret so it dont generate random every time and can open web without changing secret
Tried to add the secret in config like this:

  "enable-clash-api": true,
  "clash-api-port": 6756,
  "clash-api-secret": "KioIofJGjak9M-rP",

But when run the config it does not show up in the run command output:

config options: {LogLevel:warn EnableClashApi:true ClashApiPort:6756 ClashApiSecret: GeoIPPath: .... 

Tried without double quotes and it gives error:

Running in standalone mode
Error in read and build config invalid character 'K' looking for beginning of value

clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: Undefined symbols:
_res_9_nclose, referenced from:
_runtime.text in Libcore[arm64]2
_res_9_ninit, referenced from:
_runtime.text in Libcore[arm64]2
_res_9_nsearch, referenced from:
_runtime.text in Libcore[arm64]2
clang: error: linker command failed with exit code 1 (use -v to see invocation)

After I imported Libcore.framework into the project, this error was reported during compilation. Does anyone know what the problem is?

درخواست اضافه کردن چندین Feature به هسته sing-box یا هسته شخصی سازی شده Hiddify

سلام خدمت گروه هیدیفای و تمامی دولوپرهایی که در این پروژه مشارکت دارن و اتصال به اینترنت آزادو فراهم میکنن.
به عنوان یک کاربر میخواستم یک سری تجربه شخصیمو با شما در میان بذارم تا با استفاده از تجربه و تخصص شما، به بهتر شدن تجربه اتصال تمامی کاربران به اینترنت کمکی کرده باشم.
با توجه به تعداد زیاد پروتکل پشتیبانی شده در هسته sing-box، من هم  مثل هیدیفای و خیلی از افراد دیگه از xray به sing-box مهاجرت کرده ام. ولی متاسفانه چندین قابلیت کاربردی xray در sing-box موجود نمی باشد. اصولا باید این ایشو رو در مخزن مربوط به هسته sing-box ایجاد میکردم ولی در تلاشهای قبلیم، دولوپر sing-box چندان پاسخگو نبوده. پس تصمیم گرفتم مطالبو اینجا عرض کنم تا شاید شما با PR روی هسته sing-box ایجاد کنید و یا در در نسخه سفارشی سازی شده خودتون قرار بدید.

قسمت Host:
استفاده از Host دو کاربرد مهم دارد.
یک) در حال حاضر سرورهای DNS، با توجه به موقعیت مبدا و Routing و ... Domain رو به یک سری IP ثابت ریزالو میکنن. مثلا اگه برا دامنه ای 100 عدد IP موجود باشه، DNS معمولا فقط 2 تا از این IP ها رو برمیگردونه که با فیلتر شدن این IP ها، DNS نمیتونه کاری بکنه. اهمیت این قسمت بیشتر در قسمت bypass (direct یا fragment) مشخص میشه.
دو) کاملا مشخصه ما به DoH احتیاج داریم. متاسفانه در اکثر نرم افزار ها خود DoH با Bootstrap DNS ریزالو میشه که هسته sing-box هم به همین صورت کار میکنه و باید برای DoH یه address_resolver مشخص کرد تا با اون ریزالو بشه. ولی با توجه به اینکه استفاده از DNS over UDP همیشه در ایران مشکل ساز بوده، حتی ریزالو شدن DoH هم با مشکل همراهه. پس بهتره که قسمت Host داشته باشیم تا حداقل DoH رو خودمون بدون نیاز به DNS over UDP ریزالو کنیم.
هسته xray این کارو با استفاده از قسمت hosts و domainStrategy بخوبی انجام میده.
https://xtls.github.io/en/config/dns.html

قسمت Fallback DNS:
برای کانکت شدن به سرور دیگه در صورت در دسترس نبودن سرور DNS. این قسمت هم در xray موجود هست ولی در هسته sing-box کدنویسی نشده.
https://xtls.github.io/en/config/dns.html

قسمت Fragment:
با استفاده از قسمت Host، مشکل DNS رفع میشه و مشکل SNI با Fragment. متاسفانه دولوپر هسته sing-box بعلت اینکه روش Fragment در چین کار نمیکنه، این روشو پیاده نمیکنه ولی همه بخوبی میدونیم که در ایران بخوبی کار میکنه. بنظر من اهمیت روش Fragment در استفاده از Cloudflare و مخصوصا DoH کلادفلر مشخص میشه. با قسمت hosts میشه دامین مربوط به DoH کلادفلر رو به هر Shared CDN Reverse Proxy IP ریزالو کرد و فقط باید مشکل SNI حل بشه که اگه detour:fragment موجود باشه، تا زمانی که کل IP های کلاد فلر باز باشه، عملا DoH کلادفلر قابل استفاده خواهد بود و درنتیجه ECH.
XTLS/Xray-core#2021
XTLS/Xray-core#2131

خلاصه ایشو:
در واقع در حال حاضر از چنین ابجکت DNS ای استفاده میکنم:

{
  "dns": {
    "servers": [
      {
        "tag": "dns-os",
        "address": "local",
        "detour": "direct"
      },
      {
        "tag": "dns-bootstrap",
        "address": "1.1.1.1",
        "strategy": "ipv4_only",
        "detour": "direct"
      },
      {
        "tag": "dns-doh",
        "address": "https://cloudflare-dns.com/dns-query",
        "address_resolver": "dns-bootstrap",
        "strategy": "ipv4_only",
        "detour": "direct"
      },
      {
        "tag": "dns-block",
        "address": "rcode://success"
      }
    ]
  }
}

ولی چیزی که میتونه بهتر باشه به این صورته:

{
  "dns": {
    "servers": [
      {
        "tag": "dns-host",
        "address": "hosts",
        "hosts": {
          "cloudflare-dns.com": [
            "104.16.248.249",
            "104.16.249.249"
          ],
          "domain:youtube.com": [
            "google.com"
          ]
        }
      },
      {
        "tag": "dns-os",
        "address": "local",
        "detour": "direct"
      },
      {
        "tag": "dns-bootstrap",
        "address": "1.1.1.1",
        "strategy": "ipv4_only",
        "detour": "direct"
      },
      {
        "tag": "dns-fallback",
        "address": "1.1.1.1",
        "strategy": "ipv4_only",
        "detour": "direct"
      },
      {
        "tag": "dns-doh",
        "address": "https://cloudflare-dns.com/dns-query",
        "address_resolver": "dns-hosts",
        "strategy": "ipv4_only",
        "detour": "fragment",
        "fallback": {
          "enabled": true,
          "timeout": 5,
          "fallback_dns_tag": "dns-fallback"
        }
      },
      {
        "tag": "dns-block",
        "address": "rcode://success"
      }
    ]
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.