mimugmail / opn-repo

OPNsense repo by mimugmail
Other
325 stars 24 forks source link

Openclash is not available in your Opnsense Repository #195

Open manuvaidya81 opened 6 months ago

manuvaidya81 commented 6 months ago

Hi, i got to setup Opnsense for my Telekom Glasfiber today. I was previously using Openwrt with Openclash as my VPN to hide my IP. But i am not finding Openclash Plugin for Opnsense and i really need it. Shadowsocks plugin doesnt serve my purpose.

Pls guide me on how to get Openclash Plugin installed in Opnsense. Thanks in advance.

mihakralj commented 6 months ago

In order to run on OPNsense, the app (Openclash) has to be available for freeBSD (which is the OS under OPNsense). Openclash is developed for Linux (OS under Openwrt) - and unless someone goes through refactoring to build Openclash on freeBSD, there will be no plugin for Openclash on OPNsense.

manuvaidya81 commented 6 months ago

Ok, I understand that. Is it that difficult to build a package for opnsense? I mean freebsd and Linux both have same architecture right? If that is so difficult are there any other plugins where it works as proxy server for opnsense just like how openclash works in openwrt?

mihakralj commented 6 months ago

Linux and freeBSD have less in common than Linux and Android - but I will let you explore that on your own.

Writing a plugin for OPNsense is not hard - as long as plugin is enhancing something that runs on freeBSD.

What you are asking for is a system level rewrite of software that works on Linux to start working on freeBSD. Doable? Yes. But not by OPNsense enthusiasts. You need system engineering here.

manuvaidya81 commented 6 months ago

Ok. I didn't know that. Thanks for explaining it in detail. Any other freebsd plugins you know off which works just like Openclash??

mimugmail commented 6 months ago

This?

https://www.freshports.org/net/clash/

mimugmail commented 6 months ago

https://www.reddit.com/r/OPNsenseFirewall/comments/zy5u4d/new_community_repo_plugin_clash/

mihakralj commented 6 months ago

Michael to the rescue! Does this need a plugin wrapper? Happy to assist with that.

manuvaidya81 commented 6 months ago

This?

https://www.freshports.org/net/clash/

yes. i saw it. but i dont know how i configure it. does it really work if i simply paste the config details in it after enabling it ??

manuvaidya81 commented 6 months ago

Michael to the rescue! Does this need a plugin wrapper? Happy to assist with that.

I installed this Plugin Clash from mimugmail repo and i enabled it. after that i tried to copy config ( yaml file) details in it but it somehow doesnt work. any idea why ??

mimugmail commented 6 months ago

Anything in System : Log Files : General?

manuvaidya81 commented 6 months ago

Anything in System : Log Files : General?

i really dont know if Clash is working and i dont know where to look for the log files specifically for Clash Plugin...

manuvaidya81 commented 6 months ago

Anything in System : Log Files : General?

Nothing there related to clash.... Any cmd option to find out if clash is really working or not?

mimugmail commented 6 months ago

/usr/local/etc/rc.d/clash restart

Maybe, I dont use it myself

manuvaidya81 commented 6 months ago

/usr/local/etc/rc.d/clash restart

Maybe, I dont use it myself

Where do I copy the config details ? If I try to copy the config, nothing happens. But this clash is in your repo. You should be knowing how to get it to work in opnsense properly right? Have you already tested it on opnsense if it works or not ?

manuvaidya81 commented 6 months ago

/usr/local/etc/rc.d/clash restart

Maybe, I dont use it myself

It says permission denied.

mihakralj commented 6 months ago

How about sudo /usr/local/etc/rc.d/clash restart

manuvaidya81 commented 6 months ago

How about sudo /usr/local/etc/rc.d/clash restart

it is saying like this.... opnsense1 but i am still seeing the same old IP Address... that means Opnsense is not forwarding the DNS Traffic through Clash...

This is my Config in Clash.conf .. `mixed-port: 7890 allow-lan: true mode: Rule log-level: info external-controller: 0.0.0.0:9090 dns: enabled: true listen: :53530 ipv6: true default-nameserver:

manuvaidya81 commented 6 months ago

here is my Clash.conf contents. `mixed-port: 7890 allow-lan: true mode: Rule log-level: info external-controller: 0.0.0.0:9090 dns: enabled: true listen: :53530 ipv6: true default-nameserver:

rules:

i am completely lost in getting this clash to work.. i didnt have this much difficulty in setting up Openclash in Openwrt and after a bit of research and learning i got it everything finally working in it.

Should i add any rules in Firewall so that it works without problems ?? I am a complete noob in Opnsense . hence i am requesting help here... Thanks.

mihakralj commented 6 months ago

Is the configuration on OPNsense same as on wrt?

manuvaidya81 commented 6 months ago

no but i altered it....should i use the same config and try ??

mihakralj commented 6 months ago

We do not know. This here is not a repository of official OPNsense development - it is a repository of some enthusiasts that know just enough of freeBSD, OPNsense and coding to curate some plugin that are not part of core OPNsense.

Nobody here knows or uses clash; I never heard of it before but @mimugmail found it among freeBSD ports and now included the package to his repo here.

While we wish you success in making it work, all we can do is help YOU with troubleshooting suggestions.

manuvaidya81 commented 6 months ago

Ok, i give up then. Thanks for your time. I did exactly as explained in this Post (https://pfchina.org/?p=10526 but no success... i dont know what to do....

mimugmail commented 6 months ago

Sorry cant help here since I only build plugins but dont use them (besides AdGuard)

HernandoR commented 5 months ago

I'm new to freeBSD and OPNsense. but i'm familiar with linux and wrt. I'd love to migrate Clash into OPNsense, where should i contribute?

mimugmail commented 5 months ago

You can install the plugin, enter your config to the text box and check if it works :)

manuvaidya81 commented 5 months ago

You can install the plugin, enter your config to the text box and check if it works :)

but where do i find this Openclash Plugin in your repository ? it is not available.... Would you mind sharing the steps to follow in successfully installing this Plugin and its setup on Opnsense pls ? Thanks in advance.

mimugmail commented 5 months ago

System: Firmware: Plugins: search for clash .. its there